From a3a7562f36b701d7addf8adb9b8fc8a04612331c Mon Sep 17 00:00:00 2001 From: Jason Cheatham Date: Tue, 29 Aug 2017 20:37:52 -0400 Subject: [PATCH] Enable strict null checks for istanbuljs types --- types/istanbul-lib-coverage/tsconfig.json | 2 +- types/istanbul-lib-hook/tsconfig.json | 2 +- types/istanbul-lib-instrument/tsconfig.json | 2 +- types/istanbul-lib-report/tsconfig.json | 2 +- .../istanbul-lib-source-maps-tests.ts | 5 ++++- types/istanbul-lib-source-maps/tsconfig.json | 2 +- types/istanbul-reports/tsconfig.json | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/types/istanbul-lib-coverage/tsconfig.json b/types/istanbul-lib-coverage/tsconfig.json index 49ce27fd7d..fd839f63f8 100644 --- a/types/istanbul-lib-coverage/tsconfig.json +++ b/types/istanbul-lib-coverage/tsconfig.json @@ -10,7 +10,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/istanbul-lib-hook/tsconfig.json b/types/istanbul-lib-hook/tsconfig.json index 7fe8feabad..824b360999 100644 --- a/types/istanbul-lib-hook/tsconfig.json +++ b/types/istanbul-lib-hook/tsconfig.json @@ -10,7 +10,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/istanbul-lib-instrument/tsconfig.json b/types/istanbul-lib-instrument/tsconfig.json index d727f7ee3e..1f44277fc1 100644 --- a/types/istanbul-lib-instrument/tsconfig.json +++ b/types/istanbul-lib-instrument/tsconfig.json @@ -10,7 +10,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/istanbul-lib-report/tsconfig.json b/types/istanbul-lib-report/tsconfig.json index fa9df126ab..960c160e83 100644 --- a/types/istanbul-lib-report/tsconfig.json +++ b/types/istanbul-lib-report/tsconfig.json @@ -10,7 +10,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/istanbul-lib-source-maps/istanbul-lib-source-maps-tests.ts b/types/istanbul-lib-source-maps/istanbul-lib-source-maps-tests.ts index 3e244f3632..be03e785fc 100644 --- a/types/istanbul-lib-source-maps/istanbul-lib-source-maps-tests.ts +++ b/types/istanbul-lib-source-maps/istanbul-lib-source-maps-tests.ts @@ -31,4 +31,7 @@ transformed.sourceFinder('foo').trim(); store.dispose(); store.sourceStore.registerSource('foo', 'bar'); -store.sourceStore.getSource('foo').trim(); +const source = store.sourceStore.getSource('foo'); +if (source != null) { + source.trim(); +} diff --git a/types/istanbul-lib-source-maps/tsconfig.json b/types/istanbul-lib-source-maps/tsconfig.json index 2144d7a8bc..5693013057 100644 --- a/types/istanbul-lib-source-maps/tsconfig.json +++ b/types/istanbul-lib-source-maps/tsconfig.json @@ -10,7 +10,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/istanbul-reports/tsconfig.json b/types/istanbul-reports/tsconfig.json index e04fc70292..6235d65f52 100644 --- a/types/istanbul-reports/tsconfig.json +++ b/types/istanbul-reports/tsconfig.json @@ -10,7 +10,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../"