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

rxjs-throw-error should not complain about throwing subtypes of Error #86

Closed
felixfbecker opened this issue Feb 19, 2019 · 2 comments
Closed
Labels

Comments

@felixfbecker
Copy link

throw Object.assign(new Error('Not Found'), { code: 'NOT_FOUND' })

currently creates a complaint, but shouldn't because the type of this exception is Error & { code: string }, which is a subtype of Error.

@cartant cartant added the bug label Feb 19, 2019
@cartant
Copy link
Owner

cartant commented Feb 20, 2019

Note for self: the bug is most likely in the implementation of couldBeType, as Object.assign has this definition:

assign<T, U>(target: T, source: U): T & U;

cartant added a commit that referenced this issue Feb 23, 2019
@cartant
Copy link
Owner

cartant commented Feb 23, 2019

This should be fixed in 4.17.1.

@cartant cartant closed this as completed Feb 23, 2019
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

2 participants