Skip to content

Commit a20e59c

Browse files
committed
Add warn that user can not use --strictPropertyInitialization without --strictNullChecks
1 parent 5d67f8e commit a20e59c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/compiler/program.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,6 +2062,10 @@ namespace ts {
20622062
}
20632063

20642064
function verifyCompilerOptions() {
2065+
if (options.strictPropertyInitialization && !options.strictNullChecks) {
2066+
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks");
2067+
}
2068+
20652069
if (options.isolatedModules) {
20662070
if (options.declaration) {
20672071
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "declaration", "isolatedModules");

0 commit comments

Comments
 (0)