UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

29 lines 883 B
/** * Set the base URL for the application */ export declare function setAppUrl(url: string): void; /** * Register a route with a name */ export declare function defineRoute(name: string, path: string, params?: Record<string, any>): void; /** * Define multiple routes at once */ export declare function defineRoutes(routeDefinitions: Record<string, string | RouteDefinition>): void; /** * Generate a URL for a named route with parameters */ export declare function route(name: string, params?: Record<string, any>, absolute?: any): string; /** * Create a route URL directive processor for stx templates */ export declare function processRouteDirectives(template: string): string; /** * Reset all routes (mainly for testing) */ export declare function resetRoutes(): void; declare interface RouteDefinition { path: string name?: string params?: Record<string, any> }