UNPKG

@vaadin/hilla-file-router

Version:

Hilla file-based router

22 lines (21 loc) 906 B
import type { AgnosticRoute, Module, ViewConfig } from "../types.js"; /** * Extends a router module's config with additional properties. The original * module config is preferred over the extension. * * @param module - The module to extend. * @param config - The extension config. * @returns */ export declare function extendModule(module: Module | null, config?: ViewConfig): Module; /** * Create a single framework-agnostic route object. Later, it can be transformed into a framework-specific route object, * e.g., the one used by React Router. * * @param path - A route path segment. * @param children - An array of child routes. * * @returns A framework-agnostic route object. */ export declare function createRoute(path: string, children?: readonly AgnosticRoute[]): AgnosticRoute; export declare function createRoute(path: string, module: Module, children?: readonly AgnosticRoute[]): AgnosticRoute;