From 96bced7aa01789d96d617228e285fd25f71371f9 Mon Sep 17 00:00:00 2001 From: arolson101 Date: Thu, 1 Dec 2016 15:43:20 -0600 Subject: [PATCH] add typescript definition file --- index.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 index.d.ts 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; +}