Add support for URI()

This commit is contained in:
Brian Surowiec
2015-05-25 15:08:08 -04:00
parent 4c960b46b3
commit 74eeac855c
2 changed files with 17 additions and 1 deletions
+13
View File
@@ -1,5 +1,18 @@
/// <reference path="URI.d.ts" />
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({
+4 -1
View File
@@ -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 <https://github.com/RodneyJT>, Brian Surowiec <https://github.com/xt0rted>
// 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;