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:118
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 options are RouterBridgeOptions, because that is what
openProviderBridge hands to the constructor: the base path AND the caches of a
parse and a compilation. A BasePathOptions here named half of the value that travels,
so a bridge author read the type and learned of no cache. A bridge that declares the
narrower BasePathOptions still satisfies this type, and it reads the fields that it
knows.
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 Parameter | Default type |
|---|---|
TRouter | - |
TActor extends RoutableActor | RoutableActor |
Parameters
| Parameter | Type |
|---|---|
router | TRouter |
actor | TActor |
routeMap | RouteMap |
options? | RouterBridgeOptions |