Skip to content

Type Alias: PlayRouterBridgeConstructor<TRouter, TActor>

API / @xmachines/play-react-router / PlayRouterBridgeConstructor

type PlayRouterBridgeConstructor<TRouter, TActor> = (
router,
actor,
routeMap,
options?,
) => RouterBridge;

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

The constructor shape that a bridge class must satisfy for a provider factory: (router, actor, routeMap, options?) → RouterBridge.

TActor carries the actor type of the caller through to the constructor, so the spec type of that actor reaches the bridge whole. A bridge that reads no spec binds nothing and receives the default.

The return type is RouterBridge, the published contract of a bridge, so a consumer bridge of its own keeps compiling. Every bridge on RouterBridgeBase also satisfies MountableRouterBridge, and the provider finds that mount API at run time: a bridge without it ignores basePath, exactly as it did before the option existed.

Type Parameters

Type ParameterDefault type
TRouter-
TActor extends RoutableActorRoutableActor

Parameters

ParameterType
routerTRouter
actorTActor
routeMapRouteMap
options?BasePathOptions

Returns

RouterBridge