Skip to content

Commit 0c48f71

Browse files
committed
Merge pull request DefinitelyTyped#4191 from xt0rted/urijs-updates
Urijs updates
2 parents ab347a1 + 6c7eba4 commit 0c48f71

File tree

3 files changed

+264
-186
lines changed

3 files changed

+264
-186
lines changed

urijs/URI.d.ts

Lines changed: 0 additions & 186 deletions
This file was deleted.

urijs/URIjs-tests.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/// <reference path="URIjs.d.ts" />
2+
3+
URI();
4+
URI('http://user:[email protected]:80/foo/bar.html?foo=bar&bar=baz#frag');
5+
URI({
6+
protocol: 'http',
7+
username: 'user',
8+
password: 'pass',
9+
hostname: 'example.org',
10+
port: '80',
11+
path: '/foo/bar.html',
12+
query: 'foo=bar&bar=baz',
13+
fragment: 'frag'
14+
});
15+
URI(document.createElement('a'));
16+
17+
new URI();
18+
new URI('http://user:[email protected]:80/foo/bar.html?foo=bar&bar=baz#frag');
19+
new URI({
20+
protocol: 'http',
21+
username: 'user',
22+
password: 'pass',
23+
hostname: 'example.org',
24+
port: '80',
25+
path: '/foo/bar.html',
26+
query: 'foo=bar&bar=baz',
27+
fragment: 'frag'
28+
});
29+
new URI(document.createElement('a'));
30+
31+
URI('').setQuery('foo', 'bar');
32+
URI('').setQuery({ foo: 'bar' });
33+
URI('').setSearch('foo', 'bar');
34+
URI('').setSearch({ foo: 'bar' });
35+
36+
var uri: uri.URI = $('a').uri();

0 commit comments

Comments
 (0)