mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-22 11:40:10 +08:00
Add setQuery and setSearch methods
This commit is contained in:
@@ -26,4 +26,9 @@ new URI({
|
||||
fragment: 'frag'
|
||||
});
|
||||
|
||||
URI('').setQuery('foo', 'bar');
|
||||
URI('').setQuery({ foo: 'bar' });
|
||||
URI('').setSearch('foo', 'bar');
|
||||
URI('').setSearch({ foo: 'bar' });
|
||||
|
||||
var uri: uri.URI = $('a').uri();
|
||||
|
||||
Vendored
+4
@@ -97,6 +97,10 @@ declare module uri {
|
||||
segment(position: number): string;
|
||||
segment(position: number, level: string): string;
|
||||
segment(level: string): string;
|
||||
setQuery(key: string, value: string): URI;
|
||||
setQuery(qry: Object): URI;
|
||||
setSearch(key: string, value: string): URI;
|
||||
setSearch(qry: Object): URI;
|
||||
subdomain(): string;
|
||||
subdomain(subdomain: string): URI;
|
||||
suffix(): string;
|
||||
|
||||
Reference in New Issue
Block a user