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