-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option 'strictPropertyInitialization' cannot be specified without specifying option 'strictNullChecks' #24716
Comments
@marcomura I think, it is not a bug, see #23659 |
SPI does nothing if SNC isn't on, so this warning is to tell you that you're not doing what you think you are |
Why strictPropertyInitialization should require strictNullChecks? class C {
foo: number;
bar = "hello";
baz: boolean;
// ~~~
// Error! Property 'baz' has no initializer and is not assigned directly in the constructor.
constructor() {
this.foo = 42;
}
} Without stringNullChecks, I can solve the error explicitly assigning undefined to baz. |
Ping on this :) |
Please see what |
That's why I can't see its relation with --strictPropertyInitialization |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
Upgrading from 2.8.1 to 2.9.1, I'm now getting the error in the title.
Why strictPropertyInitialization now can't be specified without strictNullChecks? Is it a bug?
The text was updated successfully, but these errors were encountered: