# effectivePlugCage

Canonical: https://docs.shumoku.dev/en/library/api/effectivePlugCage
Language: en

@shumoku/core · 0.4.0 · function

# effectivePlugCage

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/models/port-compatibility.ts#L156)

Resolve the effective plug cage for an endpoint with the canonical priority: explicit \`plug.cage\` > module's required cage > port.connectors\[0\] (only when the port has a single connector — multi-connector combo ports require an explicit choice on the link side). Returns undefined when none are known.

```
effectivePlugCage(ep: LinkEndpoint, port?: NodePort): PortConnector | undefined
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `ep` | `LinkEndpoint` | No additional description. | `—` |
| `port` | `NodePort` | No additional description. | `—` |

## Returns

```
PortConnector | undefined
```

[`libs/@shumoku/core/src/models/port-compatibility.ts:156`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/models/port-compatibility.ts#L156)
