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

Restore @typescript-eslint/no-unsafe-argument #70

Merged
merged 2 commits into from
Dec 12, 2022

Conversation

fregante
Copy link
Member

@fregante fregante commented Dec 4, 2022

Untested, the comment seemed outdated since --strict now produces unknown

@sindresorhus
Copy link
Member

and if you pass the error anywhere, it will trigger this rule

This is the important part and I think it's still valid.

@fregante
Copy link
Member Author

fregante commented Dec 4, 2022

That seems correct, but the rule is still valid.

Also I don’t think TypeScript's error types are incorrect (too loose); They are what they are because javascript allows throw 1 and Promise.reject(1). I don't expect them to change for this reason.

Try/catch is annoying, but once I wrote my isErrorObject type guard I forgot all about this particular issue.

@fregante
Copy link
Member Author

fregante commented Dec 4, 2022

@sindresorhus sindresorhus marked this pull request as ready for review December 12, 2022 20:11
@sindresorhus sindresorhus merged commit 4fd54c2 into main Dec 12, 2022
@sindresorhus sindresorhus deleted the @typescript-eslint/no-unsafe-argument branch December 12, 2022 20:14
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

Successfully merging this pull request may close these issues.

None yet

2 participants