From 3a6cf81c60cf7b5baa81111866c7452e70f002ba Mon Sep 17 00:00:00 2001 From: felipe Date: Fri, 10 Mar 2017 08:54:55 +0100 Subject: [PATCH] use strict null checks for added type safety From the TypeScript manual "In strict null checking mode, the null and undefined values are not in the domain of every type and are only assignable to themselves and any (the one exception being that undefined is also assignable to void)." In other words, this setting means the compiler will complain if you try to use a variable, but it might be null or undefined. Since the project builds and tests pass with it, I think it's good to turn it on. If it becomes annoying, you can always turn it off later --- ts/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/tsconfig.json b/ts/tsconfig.json index 4197377e50..7ae95adc9e 100644 --- a/ts/tsconfig.json +++ b/ts/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "target": "es6", + "strictNullChecks": true, "sourceMap": true, "removeComments": true, "preserveConstEnums": true, @@ -12,4 +13,4 @@ "exclude": [ "tests" ] -} \ No newline at end of file +}