Interface: BaseRouteMapping
Documentation / @xmachines/play-router / BaseRouteMapping
Defined in: base-route-map.ts:28
A single state ID ↔ path mapping entry.
Both fields are readonly — mappings are immutable once passed to BaseRouteMap.
Adapter packages re-export a structurally compatible RouteMapping type under
their own name. This type is published from @xmachines/play-router as
BaseRouteMapping to avoid name collisions with those adapter-local types.
Example
const mapping: BaseRouteMapping = { stateId: "home", path: "/" };const paramMapping: BaseRouteMapping = { stateId: "profile", path: "/profile/:userId" };const optionalMapping: BaseRouteMapping = { stateId: "settings", path: "/settings/:section?" };Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
path | readonly | string | URL path pattern (e.g., "/", "/profile/:userId", "/settings/:section?") | base-route-map.ts:32 |
stateId | readonly | string | State machine state ID (e.g., "home", "#profile") | base-route-map.ts:30 |