mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
Update URI.d.ts
uri.search(true) does return an object, but Typescript believes there is a difference between an Object and any. Thus, if your querystring includes ?myParam=myValue, you should be able to access the value using uri.search(true).myParam. However, the compiler threw the error "The property 'myParam' does not exist on on value of type 'Object'". Changing the return type to any fixes this.
This commit is contained in:
2
urijs/URI.d.ts
vendored
2
urijs/URI.d.ts
vendored
@@ -72,7 +72,7 @@ declare class URI {
|
||||
segment(level: string): string;
|
||||
search(): string;
|
||||
search(qry: string): URI;
|
||||
search(qry: boolean): Object;
|
||||
search(qry: boolean): any;
|
||||
search(qry: Object): URI;
|
||||
query(): string;
|
||||
query(qry: string): URI;
|
||||
|
||||
Reference in New Issue
Block a user