You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeScript v4.4 changed the type of errors caught in a catch clause to be unknown as opposed to any. In order to ease the transition from v3 to v4 we turned this off in #450. Ideally we should enable this again for better type checking. This requires the following changes:
Turn on useUnknownInCatchVariables in the tsconfig.base.json
Run npm run build and see which files fail.
Add type guards to convert unknown to the right relevant type and handle cases where it's a different type
Re-run npm run build to validate that everything compiles correctly.
To do a more iterative approach you can also enable useUnknownInCatchVariables inside each individual tsconfig.json in the respective packages first before enabling it entirely.
The text was updated successfully, but these errors were encountered:
TypeScript v4.4 changed the type of errors caught in a
catch
clause to beunknown
as opposed toany
. In order to ease the transition from v3 to v4 we turned this off in #450. Ideally we should enable this again for better type checking. This requires the following changes:useUnknownInCatchVariables
in thetsconfig.base.json
npm run build
and see which files fail.unknown
to the right relevant type and handle cases where it's a different typenpm run build
to validate that everything compiles correctly.To do a more iterative approach you can also enable
useUnknownInCatchVariables
inside each individualtsconfig.json
in the respective packages first before enabling it entirely.The text was updated successfully, but these errors were encountered: