From 0e2384e4d350a397fd56a43017578f0664818d3f Mon Sep 17 00:00:00 2001 From: Klaus Sevensleeper Date: Fri, 10 Mar 2017 23:53:54 +0100 Subject: [PATCH] support strictNullChecks (#14844) better reflect the documented and implemented API --- query-string/index.d.ts | 2 +- query-string/query-string-tests.ts | 2 +- query-string/tsconfig.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/query-string/index.d.ts b/query-string/index.d.ts index 9cd6d8df1e..dcc9bfafb5 100644 --- a/query-string/index.d.ts +++ b/query-string/index.d.ts @@ -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. diff --git a/query-string/query-string-tests.ts b/query-string/query-string-tests.ts index c39c2f4982..c5ec7b624d 100644 --- a/query-string/query-string-tests.ts +++ b/query-string/query-string-tests.ts @@ -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'); diff --git a/query-string/tsconfig.json b/query-string/tsconfig.json index c0a4860fb8..3dd890dac3 100644 --- a/query-string/tsconfig.json +++ b/query-string/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../"