@vaadin/hilla-file-router
Version:
Hilla file-based router
11 lines (10 loc) • 491 B
TypeScript
import type { ServerViewConfig } from "../shared/internal.js";
import type { RouteMeta } from "./collectRoutesFromFS.js";
/**
* Creates a map of all leaf routes to their configuration. This file is used by the server to provide server-side
* routes along with managing the client-side routes.
*
* @param views - The route metadata tree.
* @returns A view configuration tree.
*/
export default function createViewConfigJson(views: readonly RouteMeta[]): Promise<readonly ServerViewConfig[]>;