mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
23 lines
569 B
TypeScript
23 lines
569 B
TypeScript
// Type definitions for feather-route-matcher 3.1
|
|
// Project: https://github.com/henrikjoreteg/feather-route-matcher
|
|
// Definitions by: Eugeny Schibrikov <https://github.com/sHooKDT>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
interface RouteConfig<T> {
|
|
[path: string]: T;
|
|
}
|
|
|
|
interface Match<T> {
|
|
page: T;
|
|
url: string;
|
|
params: { [key: string]: string } | null;
|
|
}
|
|
|
|
interface Matcher<T> {
|
|
(path: string): Match<T>;
|
|
}
|
|
|
|
declare function createMatcher<T>(config: RouteConfig<T>): Matcher<T>;
|
|
|
|
export { createMatcher as default };
|