UNPKG

@vaadin/hilla-file-router

Version:

Hilla file-based router

13 lines (12 loc) 681 B
import { type Signal } from "@vaadin/hilla-react-signals"; import type { MenuItem, ViewConfig } from "../types.js"; export declare const viewsSignal: Signal<Readonly<Record<string, Readonly<ViewConfig>>> | undefined>; /** * Creates menu items from the views provided by the server. The views are sorted according to the * {@link ViewConfig.menu.order}, filtered out if they are explicitly excluded via {@link ViewConfig.menu.exclude}. * Note that views with no order are put below views with an order. Ties are resolved based on the path string * comparison. * * @returns A list of menu items. */ export declare function createMenuItems<T = unknown>(): ReadonlyArray<MenuItem<T>>;