Skip to content

Interface: LocationLike

API / @xmachines/play-router / LocationLike

Defined in: 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
pathnamereadonlystringtypes.ts:415
searchreadonlystringtypes.ts:416