diff --git a/url-join/index.d.ts b/url-join/index.d.ts index 82715e643e..3dc87d456f 100644 --- a/url-join/index.d.ts +++ b/url-join/index.d.ts @@ -1,12 +1,15 @@ // Type definitions for url-join v0.8.3 // Project: https://github.com/jfromaniello/url-join -// Definitions by: Rogier Schouten +// Definitions by: Rogier Schouten , Mike Deverell // Definitions: https://github.com/borisyankov/DefinitelyTyped /** * Join all arguments together and normalize the resulting url. * This works similar to path.join but you shouldn't use path.join for urls since it will work different depending of the operative systems but also doesn't work for some cases. - */ -declare function urljoin(...parts: string[]): string; + */ -export = urljoin; +declare var urljoin: (...parts: string[]) => string; + +declare module "url-join" { + export = urljoin; +} diff --git a/url-join/url-join-tests.ts b/url-join/url-join-tests.ts index 182b44359e..2b512bc6d4 100644 --- a/url-join/url-join-tests.ts +++ b/url-join/url-join-tests.ts @@ -1,4 +1,5 @@ - import urljoin = require("url-join"); +import * as urljoin2 from "url-join"; const s: string = urljoin("foo", "bar", "baz"); +const s2: string = urljoin2("foo", "bar", "baz");