jay-js
Version:
Jay is a framework for creating a single page application.
19 lines (18 loc) • 580 B
TypeScript
declare type Route = {
path: string;
element: () => HTMLElement | Promise<HTMLElement>;
target: HTMLElement;
};
declare type MatchType = {
result: Array<string>;
route: Route;
};
declare type ParamsType = {
[key: string]: string;
};
export declare const getParams: () => ParamsType;
export declare const getPotentialMatch: () => MatchType;
export declare const Router: (routes?: Route[]) => Promise<void>;
export declare const Lazy: (element: string) => Promise<unknown>;
export declare const Navigate: (path: string) => void;
export {};