support strictNullChecks (#14844)

better reflect the documented and implemented API
This commit is contained in:
Klaus Sevensleeper 2017-03-10 23:53:54 +01:00 committed by Mohamed Hegazy
parent e849164bf3
commit 0e2384e4d3
3 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ declare module "query-string" {
* Leading ? or # are ignored, so you can pass location.search or location.hash directly.
* @param str
*/
export function parse(str: string): { [key: string]: string | string[] };
export function parse(str: string): { [key: string]: string | string[] | null };
/**
* Stringify an object into a query string, sorting the keys.

View File

@ -21,7 +21,7 @@ namespace stringify_tests {
}
namespace parse_tests {
let result: { [key: string]: string | string[] };
let result: { [key: string]: string | string[] | null };
result = qs.parse('?foo=bar');
result = qs.parse('#foo=bar');
result = qs.parse('&foo=bar&foo=baz');

View File

@ -6,7 +6,7 @@
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"