Merge pull request #25809 from ajafff/verify-strict-options

correctly detect if strictNullChecks is enabled
This commit is contained in:
Mohamed Hegazy
2018-07-19 15:56:45 -07:00
committed by GitHub
5 changed files with 20 additions and 1 deletions

View File

@@ -2366,7 +2366,7 @@ namespace ts {
}
function verifyCompilerOptions() {
if (options.strictPropertyInitialization && !options.strictNullChecks) {
if (options.strictPropertyInitialization && !getStrictOptionValue(options, "strictNullChecks")) {
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks");
}