/* * Match and params */ import { Path } from "./use-location"; export interface DefaultParams { [paramName: string]: string; } export type Params = T; export type MatchWithParams = [ true, Params ]; export type NoMatch = [false, null]; export type Match = | MatchWithParams | NoMatch; export type MatcherFn = (pattern: Path, path: Path) => Match; export default function makeMatcher( makeRegexpFn?: ( pattern: string, keys?: Array<{ name: string | number }> ) => RegExp ): MatcherFn;