Shumoku Docs

Search documentation

Shared docs and current release

Loading search…

日本語

@shumoku/core · 0.4.0 · function

standardsForConnectors

Source

Standards available given the connectors on each port. Used by the editor's cascading "Standard" picker so the dropdown only offers links that physically fit. Empty arrays are treated permissively — we'd rather show too many than none. For combo ports (multiple connectors), this returns the union: any standard that fits at least one connector on each side qualifies. Returned as one flat list; group via `option.group` if the UI wants to split into sections.

standardsForConnectors(fromConnectors: readonly string[] | undefined, toConnectors: readonly string[] | undefined): StandardOption[]

Parameters

Parameter Type Description Default
fromConnectors readonly string[] | undefined No additional description.
toConnectors readonly string[] | undefined No additional description.

Returns

StandardOption[]

libs/@shumoku/core/src/models/standards.ts:392