Skip to content

Function: openProviderBridge()

API / @xmachines/play-router / openProviderBridge

function openProviderBridge<TRouter, TActor>(BridgeCtor, __namedParameters): object;

Defined in: play-router/src/provider-lifecycle.ts:179

Builds a bridge, connects it, and hands back the way to close it.

The order is the contract: the constructor applies the mount, connect() runs the first synchronization against it, and close() disconnects exactly the bridge that this call opened. A provider that closed “the current bridge” instead would disconnect a later one when two mounts overlap.

Type Parameters

Type Parameter
TRouter
TActor extends PlayActor

Parameters

ParameterType
BridgeCtorPlayRouterBridgeConstructor<TRouter>
__namedParametersOpenProviderBridgeArgs<TRouter, TActor>

Returns

object

The bridge, and a close that disconnects it one time.

NameTypeDefined in
bridgeRouterBridgeplay-router/src/provider-lifecycle.ts:182
close()() => voidplay-router/src/provider-lifecycle.ts:182