Merge pull request #5853 from bdoss/master

Fixed issues with URIjs typing definitions for certain overloads of the segment method.
This commit is contained in:
Masahiro Wakame
2015-09-27 10:40:30 +09:00
3 changed files with 11 additions and 3 deletions
+4
View File
@@ -276,6 +276,10 @@ declare module Sammy {
}
}
declare module "sammy" {
export = Sammy;
}
interface JQueryStatic {
sammy: Sammy.SammyFunc;
log: Function;
+4
View File
@@ -34,3 +34,7 @@ URI('').setSearch('foo', 'bar');
URI('').setSearch({ foo: 'bar' });
var uri: uri.URI = $('a').uri();
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']);
+3 -3
View File
@@ -95,10 +95,10 @@ declare module uri {
search(qry: boolean): any;
search(qry: Object): URI;
segment(): string[];
segment(segments: string[]): string;
segment(segments: string[]): URI;
segment(position: number): string;
segment(position: number, level: string): string;
segment(level: string): string;
segment(position: number, level: string): URI;
segment(segment: string): URI;
setQuery(key: string, value: string): URI;
setQuery(qry: Object): URI;
setSearch(key: string, value: string): URI;