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: ast-spec should allow AwaitExpression and NewExpression in LeftHandSideExpression #6239

Closed as not planned
Labels
duplicateThis issue or pull request already exists
@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.

Relevant Package

ast-spec

Playground Link

https://typescript-eslint.io/play/#ts=4.9.3&sourceType=module&showAST=es&code=MYewdgzgLgBApgDwIYFsAOAbOMC8MDeAvjEhCWAJ4DcAUDQBRIDuSAlrIqpnAJQB0aAE4g0tRi3YwwcJvGTos-ISNo1EaEINj4YhKkA&eslintrc=N4KABGBEBOCuA2BTAzpAXGYBfEWg&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkeAhpgObp4VTolHoAebANOBqQSeTMmh4AcgFdUqAMIALdNADWZSmJnohAXxB6gA

Repro Code

constexample={}asany;(awaitexample).prop;(awaitnewexample).prop;

ESLint Config

No response

tsconfig

No response

Expected Result

In the type system: theobject property in theTSESTree.MemberExpression type is aTSESTree.LeftHandSideExpression.

In the playground's tree: theobject property on the firstMemberExpression is anAwaitExpression. The secondMemberExpression'sobject property is aNewExpression.

TSESTree.LeftHandSideExpression should therefore allowTSESTree.AwaitExpression andTSESTree.NewExpression.

Actual Result

TheTSESTree.LeftHandSideExpression union does not includeTSESTree.AwaitExpression orTSESTree.NewExpression.

Additional Info

Originally spotted inhttps://github.com/typescript-eslint/typescript-eslint/pull/6028/files#r1032600861

Versions

packageversion
@typescript-eslint/ast-spec5.46.1
@typescript-eslint/types5.46.1
@typescript-eslint/typescript-estree5.46.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    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