Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
let value: number;
value = spooky;
ESLint Config
module.exports = {
"rules": {
"@typescript-eslint/no-unsafe-assignment": "error"
}
}
tsconfig
No response
Expected Result
Users should be told that the type is an "error" variant of any
. It's confusing to have the same report show up for both a "real" any
and an error in type checking.
Actual Result
The same error as if we'd added a declare const spooky: any;
:
Unsafe assignment of an `any` value.
Additional Info
Although the type's typeToString()
returns "any"
, its intrinsic name is "error"
. See the Types panel of the linked playground.
Error types in type checking are often a symptom of misconfiguration around TypeScript and/or typescript-eslint. Example StackOverflow question around an any
in a lint rule.