Bug: [await-thenable] Also flag unknown #8301
8000
Labels
awaiting response
Issues waiting for a reply from the OP or another party
bug
Something isn't working
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.3.3&fileType=.ts&code=CYUwxgNghgTiAEYD2A7AzgF3hkmBc8ArigNYpIDuKA3AFAAUUaAnimPPQJTwC8AfPADetePCgUoASyw5MtAL6cu1IA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6AQwHd3K78ALRE3YAjJOiiJo0APbRI4MAF8QSoA&tsconfig=&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
There's no guarantee that an
unknown
-typed value is a Thenable. I'd expect the rule to report a complaint in this case.Actual Result
No complaint.
Additional Info
await-thenable
was first implemented in #192 back in 2019. TypeScript had previously releasedunknown
in TypeScript 3.0 less than a year earlier.Not detecting
unknown
was noted by @Tjstretchalot in #8094 (comment).The text was updated successfully, but these errors were encountered: