mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-10 22:44:43 +08:00
Adds segmentCoded method to URIjs types
This commit is contained in:
5
types/urijs/index.d.ts
vendored
5
types/urijs/index.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user