diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..ae879b7 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,16 @@ + +declare module "docuri" { + interface Route { + // 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(route: string): Route; + export function route(route: string): Route; +}