Skip to content

Interface: LocationLike

API / @xmachines/play-sveltekit-router / LocationLike

Defined in: play-router/src/types.ts:414

Minimal location interface required by adapters that read the current URL at connect() time. Injectable for SSR and testing — pass a mock instead of the global location when the DOM is unavailable.

Defined structurally (no Location reference) so this package compiles without the DOM lib.

Example

// SSR / test — injected mock
const mockLoc: LocationLike = { pathname: "/dashboard", search: "?tab=posts" };
connectRouter({ actor, routeMap, location: mockLoc });

Properties

PropertyModifierTypeDefined in
pathnamereadonlystringplay-router/src/types.ts:415
searchreadonlystringplay-router/src/types.ts:416