mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-15 12:24:47 +00:00
work in progress
This commit is contained in:
15
src/interfaces.ts
Normal file
15
src/interfaces.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
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;
|
||||
};
|
||||
Reference in New Issue
Block a user