UNPKG

@simplr-wc/router

Version:

Simplr Router is a routing solution for the Web providing a seamless SPA experience with minimal setup.

37 lines (36 loc) 1.3 kB
/** * @typedef SimplrRouterOptions * @property { import("./SimplrRoute").SimplrRoute[] } routes Routes provided for the Simplr Router. * @property { string } [rootPath] Root path of the router. If the root is not the origin of the host. * @property { number } [transitionSpeed] Transition speed of view transitions in milliseconds. * @property { Function } [notFoundAction] Action triggered when a view is not found. * @property { Function } [forbiddenAction] Action triggered when access to a view is forbidden by a guard function. * @property { boolean } [debugging] Enable debugging * */ export const _routerOptions: {}; export type SimplrRouterOptions = { /** * Routes provided for the Simplr Router. */ routes: import("./SimplrRoute").SimplrRoute[]; /** * Root path of the router. If the root is not the origin of the host. */ rootPath?: string; /** * Transition speed of view transitions in milliseconds. */ transitionSpeed?: number; /** * Action triggered when a view is not found. */ notFoundAction?: Function; /** * Action triggered when access to a view is forbidden by a guard function. */ forbiddenAction?: Function; /** * Enable debugging */ debugging?: boolean; };