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

no-unsafe-type-assertion: redundant thanks to satisfies? #746

Open
danielnixon opened this issue Mar 20, 2023 · 1 comment
Open

no-unsafe-type-assertion: redundant thanks to satisfies? #746

danielnixon opened this issue Mar 20, 2023 · 1 comment

Comments

@danielnixon
Copy link
Owner

See microsoft/TypeScript#47920 and https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator

@danielnixon danielnixon changed the title no-unsafe-type-assertion: redundant thanks to satisfies no-unsafe-type-assertion: redundant thanks to satisfies? Mar 22, 2023
@Samuel-Therrien-Beslogic
Copy link

Samuel-Therrien-Beslogic commented Sep 3, 2024

Even if satisfies exists, people still use good ol' casting a lot of the time.
An equivalent rule "no cast (use satisfies)" that can still be configured as warning or disabled when too complex would still be needed imo to replace no-unsafe-type-assertion (maybe it already exists in a plugin)

Edit: This with option "never": https://typescript-eslint.io/rules/consistent-type-assertions/
Edit 2: typescript-eslint is accepting PRs for this rule: typescript-eslint/typescript-eslint#7173

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

2 participants