-
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
Enable '--strictNullChecks' #22088
Enable '--strictNullChecks' #22088
Conversation
d386f8f
to
34662b7
Compare
34662b7
to
dc2f7dc
Compare
dc2f7dc
to
8deee11
Compare
|
@sandersn On my workstation |
I'm on board with all the changes except the non-optional non-undefined parent-pointers. While internally we use them with reckless abandon (the checker only operates on fully bound trees, after all), people using our transforms APIs won't have parent pointers bound (and shouldn't use them) - and making our public API correct is important. The, like, 1000 extra assertions we'd need internally are probably worth it. Also |
API tests pass when I run them locally on either windows or linux -- don't know why travis is failing. |
The travis failure repros locally for me (looks like |
Just needed to get Jake to run with |
TIL jenkins will refuse to build when there are merge conflicts. |
Fixes #9432
The changes generally amount to:
| undefined
as appropriate.!
in many placesSymbol
andType
.E | undefined
, so we need to writee! & E.SomeFlag
.no-unnecessary-type-assertion
lint rule ensures that these are only added where necessary.!
are marked with Tracking invalid type assertions #18217.!!
to make expressions beboolean
instead ofboolean | undefined
.= false
to initialize the boolean.condition && optional
tocondition ? optional : undefined
to avoid getting aOptional | undefined | false
.Debug.fail()
toreturn Debug.fail()
to tell the compiler that we definitely return from a function