prevent client-side navigation to server routes - fixes #145

This commit is contained in:
Rich Harris
2018-02-28 14:23:19 -05:00
parent 9bebb56bd6
commit c36780fdc8
9 changed files with 36 additions and 15 deletions

View File

@@ -14,7 +14,8 @@ export interface Component {
export type Route = {
pattern: RegExp;
params: (match: RegExpExecArray) => Record<string, string>;
load: () => Promise<{ default: ComponentConstructor }>
load: () => Promise<{ default: ComponentConstructor }>;
ignore?: boolean;
};
export type ScrollPosition = {