diff --git a/types/urijs/index.d.ts b/types/urijs/index.d.ts index 649dba4f0a..63df83601c 100644 --- a/types/urijs/index.d.ts +++ b/types/urijs/index.d.ts @@ -104,6 +104,11 @@ declare namespace uri { segment(position: number): string; segment(position: number, level: string): URI; segment(segment: string): URI; + segmentCoded(): string[]; + segmentCoded(segments: string[]): URI; + segmentCoded(position: number): string; + segmentCoded(position: number, level: string): URI; + segmentCoded(segment: string): URI; setQuery(key: string, value: string): URI; setQuery(qry: Object): URI; setSearch(key: string, value: string): URI; diff --git a/types/urijs/urijs-tests.ts b/types/urijs/urijs-tests.ts index 0c5e8dfb4b..12c853d8b4 100644 --- a/types/urijs/urijs-tests.ts +++ b/types/urijs/urijs-tests.ts @@ -39,6 +39,10 @@ URI('http://example.org/foo/hello.html').segment('bar'); URI('http://example.org/foo/hello.html').segment(0, 'bar'); URI('http://example.org/foo/hello.html').segment(['foo', 'bar', 'foobar.html']); +URI('http://example.org/foo/hello.html').segmentCoded('foo bar'); +URI('http://example.org/foo/hello.html').segmentCoded(0, 'foo bar'); +URI('http://example.org/foo/hello.html').segmentCoded(['foo bar', 'bar foo', 'foo bar.html']); + var withDuplicates = URI("?bar=1&bar=1") .duplicateQueryParameters(true) .normalizeQuery()