mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 11:15:14 +00:00
15 lines
366 B
TypeScript
15 lines
366 B
TypeScript
export type Route = {
|
|
id: string;
|
|
type: 'page' | 'route';
|
|
file: string;
|
|
pattern: RegExp;
|
|
test: (url: string) => boolean;
|
|
exec: (url: string) => Record<string, string>;
|
|
parts: string[];
|
|
dynamic: string[];
|
|
};
|
|
|
|
export type Template = {
|
|
render: (data: Record<string, string>) => string;
|
|
stream: (res, data: Record<string, string | Promise<string>>) => void;
|
|
}; |