Docs

ドキュメントを検索

共通文書と現行公開版

検索を読み込み中…

EN

@shumoku/core · 0.4.2 · function

isPortLinked

ソース

APIの説明は英語のcanonical sourceを表示しています。

Whether the given port already appears as an endpoint of any link. A physical port models one cable termination, so it can host at most one link at a time. Callers use this to reject attempts to wire a second link onto an already-connected port — `linkExists` only catches exact-duplicate links, which isn't enough for the "1 port = 1 link" invariant.

isPortLinked(links: Link[], nodeId: string, portId: string): boolean

パラメーター

名前 型 説明 既定値
links Link[] 追加説明はありません。 —
nodeId string 追加説明はありません。 —
portId string 追加説明はありません。 —

戻り値

boolean

libs/@shumoku/core/src/libs/@shumoku/core/src/layout/interaction.ts:590