Skip to content
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

Incrementally enable TypeScript strictNullChecks #775

Closed
twschiller opened this issue Jul 12, 2021 · 1 comment
Closed

Incrementally enable TypeScript strictNullChecks #775

twschiller opened this issue Jul 12, 2021 · 1 comment
Labels
developer experience wontfix This will not be worked on

Comments

@twschiller
Copy link
Contributor

Long-term code quality initiative, incremental plan to turn on TypeScript's strictNullChecks option

Reference on incremental migration:

@fregante
Copy link
Contributor

fregante commented Sep 15, 2022

New option, currently under development, is this project:

It'd enable strictNullChecks everywhere and temporarily ignore all existing errors. However this means we'll have 1.9k lines of // @ts-expect-error temporarily cluttering our code. We have just about 130k lines now (95k of pure code) so it wouldn't be overwhelming.

Demo:

  • 47cbf3a

Pros:

  • new code will hopefully be stricter

Cons:

  • @ts-expect-error silences all errors on those lines

Given the current amount of non-strict code (1900 LoC), enabling strictNullChecks feels impossible at this point. My previous attempt is probably still the solution with the best DX to enable it on new files without completely silencing the existing files:

@twschiller twschiller added the wontfix This will not be worked on label Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants