router5-helpers
Version:
Router5 helpers for comparing and checking routes
15 lines (14 loc) • 467 B
TypeScript
export interface State {
name: string;
params?: {
[key: string]: any;
};
[key: string]: any;
}
export interface SegmentTestFunction {
(route: string | State, segment: string): boolean;
(route: string | State): (segment: string) => boolean;
}
export declare const startsWithSegment: SegmentTestFunction;
export declare const endsWithSegment: SegmentTestFunction;
export declare const includesSegment: SegmentTestFunction;