@shumoku/core · 0.4.0 · function
removePort
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 Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
portId | string | No additional description. | — |
nodes | Map<string, Node> | No additional description. | — |
ports | Map<string, ResolvedPort> | No additional description. | — |
links | Link[] | No additional description. | — |
Returns
{ links: Link[]; nodes: Map<string, Node>; ports: Map<string, ResolvedPort> } | null