diff --git a/index.d.ts b/index.d.ts index 3f969c3..89f3ddd 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,3 +1,5 @@ +import type { SvelteComponentTyped } from "svelte"; + interface TinroRoute { url: string from: string @@ -81,7 +83,39 @@ declare interface TinroRouter { export const active: any export function meta(): TinroRouteMeta export const router: TinroRouter -export class Route { + +type RouteArgs = { + /** + * Exact o relative path of the route + * @default "/*" + */ + path?: string; + + /** + * Is route fallback + * @default false + */ + fallback?: boolean; + + /** + * Redirect route to the specified path + */ + redirect?: string; + + /** + * Will be show only first matched with URL nested route + * @default false + */ + firstmatch?: boolean; + + /** + * Name of the route to use in breadcrumbs + * @default null + */ + breadcrumb?: string; +} + +export class Route extends SvelteComponentTyped { $$prop_def: { /** * Exact o relative path of the route