Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: [await-thenable] Also flag unknown #8301

Closed as not planned
Closed as not planned
Labels
awaiting responseIssues waiting for a reply from the OP or another partybugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

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 havesearched for related issues and found none that matched my issue.
  • I haveread the FAQ and my problem is not listed.

Playground Link

https://typescript-eslint.io/play/#ts=5.3.3&fileType=.ts&code=CYUwxgNghgTiAEYD2A7AzgF3hkmBc8ArigNYpIDuKA3AFAAUUaAnimPPQJTwC8AfPADetePCgUoASyw5MtAL6cu1IA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6AQwHd3K78ALRE3YAjJOiiJo0APbRI4MAF8QSoA&tsconfig=&tokens=false

Repro Code

declareconsttest:unknown;(async()=>{awaittest})();

ESLint Config

module.exports={parser:"@typescript-eslint/parser",rules:{"@typescript-eslint/await-thenable":"error"},};

tsconfig

{}

Expected Result

There's no guarantee that anunknown-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 inTypeScript 3.0 less than a year earlier.

Not detectingunknown was noted by@Tjstretchalot in#8094 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responseIssues waiting for a reply from the OP or another partybugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp