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

Error type is unknown, not Error? #25

Closed
OliverJAsh opened this issue Nov 6, 2018 · 5 comments
Closed

Error type is unknown, not Error? #25

OliverJAsh opened this issue Nov 6, 2018 · 5 comments

Comments

@OliverJAsh
Copy link

In the types, the error is typed as Error. However, in JS any type can be thrown, e.g. throw "foo";.

Should we correct the type of the error to unknown (in TypeScript terms), or is there something that converts it to an Error?

@bvaughn
Copy link
Owner

bvaughn commented Nov 6, 2018

Yeah, seems reasonable.

@OliverJAsh
Copy link
Author

I'm not familiar with Flow so I'm not quite sure what the equivalent to TypeScript's unknown type is?

@bvaughn
Copy link
Owner

bvaughn commented Nov 6, 2018

Either any or mixed should be okay for this case.

@kentcdodds
Copy link
Collaborator

Closing all old issues as we're making significant changes. Please open a new issue if this is still a problem you'd like to have fixed.

@tommarien
Copy link
Contributor

@OliverJAsh This should have been fixed in version >= 3.1.3

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

4 participants