# removePort

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

@shumoku/core · 0.4.0 · function

# removePort

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

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

Remove a port and redistribute remaining ports on the same node. Also removes any links that reference this port. Returns updated nodes, ports, and links.

```
removePort(portId: string, nodes: Map<string, Node>, ports: Map<string, ResolvedPort>, links: Link[]): { links: Link[]; nodes: Map<string, Node>; ports: Map<string, ResolvedPort> } | null
```

## パラメーター

| 名前 | 型 | 説明 | 既定値 |
| --- | --- | --- | --- |
| `portId` | `string` | 追加説明はありません。 | `—` |
| `nodes` | `Map<string, Node>` | 追加説明はありません。 | `—` |
| `ports` | `Map<string, ResolvedPort>` | 追加説明はありません。 | `—` |
| `links` | `Link[]` | 追加説明はありません。 | `—` |

## 戻り値

```
{ links: Link[]; nodes: Map<string, Node>; ports: Map<string, ResolvedPort> } | null
```

[`libs/@shumoku/core/src/layout/interaction.ts:816`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/interaction.ts#L816)
