Closed as not planned
Closed as not planned
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.
Relevant Package
ast-spec
Playground Link
Repro Code
const example = {} as any;
(await example).prop;
(await new example).prop;
ESLint Config
No response
tsconfig
No response
Expected Result
In the type system: the object
property in the TSESTree.MemberExpression
type is a TSESTree.LeftHandSideExpression
.
In the playground's tree: the object
property on the first MemberExpression
is an AwaitExpression
. The second MemberExpression
's object
property is a NewExpression
.
TSESTree.LeftHandSideExpression
should therefore allow TSESTree.AwaitExpression
and TSESTree.NewExpression
.
Actual Result
The TSESTree.LeftHandSideExpression
union does not include TSESTree.AwaitExpression
or TSESTree.NewExpression
.
Additional Info
Originally spotted in https://github.com/typescript-eslint/typescript-eslint/pull/6028/files#r1032600861
Versions
package | version |
---|---|
@typescript-eslint/ast-spec |
5.46.1 |
@typescript-eslint/types |
5.46.1 |
@typescript-eslint/typescript-estree |
5.46.1 |