mirror of https://github.com/jo/docuri.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
444 B
TypeScript
17 lines
444 B
TypeScript
|
|
declare module "docuri" {
|
|
interface Route<T, S> {
|
|
// parse DocURI string to object
|
|
(str: S): T | false;
|
|
|
|
// generate DocURI string from object
|
|
(obj: T): S;
|
|
|
|
// change DocURI string parts with values provided by object returning a string
|
|
(str: S, obj: T): S;
|
|
}
|
|
|
|
export function route<T, S>(route: string): Route<T, S>;
|
|
export function route<T>(route: string): Route<T, string>;
|
|
}
|