microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
101.26k stars 12.52k forks source link

Remove getNonNullableType application in checkIdentifier #60523

Open bgenia opened 1 week ago

bgenia commented 1 week ago

Fixes #60514

Andarist commented 1 week ago

Out of pure curiosity - do you know why this doesn't regress the tests introduced by https://github.com/microsoft/TypeScript/pull/50092 ? :p

jakebailey commented 1 week ago

That PR's test didn't seem to enable strict mode...

bgenia commented 1 week ago

Enabling strict mode in that test causes undefined to appear in the baselines, but everything still seems correct. I also tried applying these changes directly to that PR to ensure that other PRs didn't affect it, and the result is the same, both with and without strict null checks. I guess this wasn't needed? At least for that test.