diff --git a/urijs/URI-tests.ts b/urijs/URI-tests.ts index 75e999140..0c5efc8c7 100644 --- a/urijs/URI-tests.ts +++ b/urijs/URI-tests.ts @@ -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(); diff --git a/urijs/URI.d.ts b/urijs/URI.d.ts index b140df400..f745c6164 100644 --- a/urijs/URI.d.ts +++ b/urijs/URI.d.ts @@ -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;