Introduce -strictNullChecks compiler option

This commit is contained in:
Anders Hejlsberg
2016-02-14 18:41:38 -08:00
parent af9dc41747
commit 26cc99b92d
3 changed files with 10 additions and 0 deletions

View File

@@ -326,6 +326,11 @@ namespace ts {
name: "noImplicitUseStrict",
type: "boolean",
description: Diagnostics.Do_not_emit_use_strict_directives_in_module_output
},
{
name: "strictNullChecks",
type: "boolean",
description: Diagnostics.Enable_strict_null_checks
}
];

View File

@@ -2576,6 +2576,10 @@
"category": "Message",
"code": 6112
},
"Enable strict null checks.": {
"category": "Message",
"code": 6113
},
"Variable '{0}' implicitly has an '{1}' type.": {
"category": "Error",

View File

@@ -2420,6 +2420,7 @@ namespace ts {
allowSyntheticDefaultImports?: boolean;
allowJs?: boolean;
noImplicitUseStrict?: boolean;
strictNullChecks?: boolean;
/* @internal */ stripInternal?: boolean;
// Skip checking lib.d.ts to help speed up tests.