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
Consider using Typescript strict flag #6769
Comments
Would definitely like to do this and it's unfortunate we can't turn it on file by file. I wonder if rather than immediately leaping to strict: true, if we could turn on all the flags that |
We could turn the flag on locally and fix issues, then submit those patches with strict: false. In the end, we'd hopefully only need to fix a few regressions in the final PR that turns on strict true. We can also go by individual components but I am afraid most of errors are about getting data from hash maps. |
…le with strict mode Typescript Issues: #6769
Solves type issues in HTTPRequest/Response with some slight changes in the behaviour and API. Issues #6769
Solves type issues in HTTPRequest/Response with some slight changes in the behaviour and API. Issues #6769
Solves type issues in HTTPRequest/Response with some slight changes in the behaviour and API. Issues #6769
Great job on the Typescript Migration!
strict
is one of the most useful Typescript flags to catchcannot access key of undefined
errors early on.Flag documentation
https://www.typescriptlang.org/tsconfig#strict
Migration process
Having worked on migrating a big non-strict project to strict mode, I know it is quite the undertaking. Typescript does not allow to apply a flag to a single file, so enabling it directly would mean porting the entire codebase at once, which is very error-prone.
However, I have used
ts-strictify
to run an additional CI check if enablingstrict
flag would break any changed files. This way, we can be sure any new code is strict.The text was updated successfully, but these errors were encountered: