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

Properly annotate caught errors as unknown #1615

Open
dstaley opened this issue Oct 11, 2021 · 0 comments
Open

Properly annotate caught errors as unknown #1615

dstaley opened this issue Oct 11, 2021 · 0 comments
Assignees

Comments

@dstaley
Copy link
Member

dstaley commented Oct 11, 2021

To get us building with TypeScript 4.4, I went ahead and use any as the type for our caught errors (since that's the behavior pre-4.4). However, we should probably annotate those as unknown instead, and use an instanceof check to ensure they're errors before accessing things like .message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant