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

Adapt try/catch blocks to TS 4.4 #569

Open
1 task
luismiramirez opened this issue May 12, 2022 · 0 comments
Open
1 task

Adapt try/catch blocks to TS 4.4 #569

luismiramirez opened this issue May 12, 2022 · 0 comments
Labels

Comments

@luismiramirez
Copy link
Member

luismiramirez commented May 12, 2022

In TS 4.4, useUnknownInCatchVariables is activated by default if you have it configured to strict: true. Which is a good practice.

This makes the caught variables in a try/catch block to be of the unknown type, so we need to check if the object we are catching is an error in our try/catch blocks to comply with this new rule.

In #567, TS got updated to 4.4 along with other dependencies to make the React 18 tests pass; the mentioned config option is explicitly deactivated until we adapt our try/catch blocks.

Official docs: https://www.typescriptlang.org/tsconfig#useUnknownInCatchVariables

TODO

  • Adapt the try/catch blocks the integration has and remove the config option deactivation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant