# isPortLinked

Canonical: https://docs.shumoku.dev/ja/library/api/isPortLinked
Language: ja

@shumoku/core · 0.4.0 · function

# isPortLinked

[ソース](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/interaction.ts#L580)

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/layout/interaction.ts:580`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/interaction.ts#L580)
