Open danielnixon opened 1 year ago
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: https://github.com/typescript-eslint/typescript-eslint/issues/7173
See https://github.com/microsoft/TypeScript/issues/47920 and https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator