UNPKG

route-interceptor

Version:
10 lines (9 loc) 346 B
export declare type Way = "a" | "window.open" | "history" | "hash" | "location"; export declare type Intercept = (url: string) => string | false; export declare type InterceptorInstance = { start: () => void; }; export declare function create({ way, intercept, }: { way: Way[]; intercept: Intercept; }): InterceptorInstance;