From 74eeac855c6e93bc6a780700cc06ba0b5059ae0a Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Fri, 24 Apr 2015 22:21:50 -0400 Subject: [PATCH] Add support for URI() --- urijs/URI-tests.ts | 13 +++++++++++++ urijs/URI.d.ts | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/urijs/URI-tests.ts b/urijs/URI-tests.ts index 4ab69219e..75e999140 100644 --- a/urijs/URI-tests.ts +++ b/urijs/URI-tests.ts @@ -1,5 +1,18 @@ /// +URI(); +URI('http://user:pass@example.org:80/foo/bar.html?foo=bar&bar=baz#frag'); +URI({ + protocol: 'http', + username: 'user', + password: 'pass', + hostname: 'example.org', + port: '80', + path: '/foo/bar.html', + query: 'foo=bar&bar=baz', + fragment: 'frag' +}); + new URI(); new URI('http://user:pass@example.org:80/foo/bar.html?foo=bar&bar=baz#frag'); new URI({ diff --git a/urijs/URI.d.ts b/urijs/URI.d.ts index 2f40b1a46..b140df400 100644 --- a/urijs/URI.d.ts +++ b/urijs/URI.d.ts @@ -1,4 +1,4 @@ -// Type definitions for URI.js +// Type definitions for URI.js 1.15.1 // Project: https://github.com/medialize/URI.js // Definitions by: RodneyJT , Brian Surowiec // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -128,6 +128,9 @@ declare module uri { } interface URIStatic { + (): URI; + (value: string | URIOptions): URI; + new (): URI; new (value: string | URIOptions): URI;