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
Labels
stale For marking issues as stale. Labeled issues will be closed soon if label is not removed.

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.

@dstaley dstaley self-assigned this Oct 11, 2021
@alexcottner alexcottner added the stale For marking issues as stale. Labeled issues will be closed soon if label is not removed. label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale For marking issues as stale. Labeled issues will be closed soon if label is not removed.
Projects
None yet
Development

No branches or pull requests

2 participants