Bug: SpreadElement
does not allow NewExpression
parent
#10023
Labels
bug
Something isn't working
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
triage
Waiting for team members to take a look
Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
types
Playground Link
https://typescript-eslint.io/play/#ts=5.5.2&showAST=es&fileType=.tsx&code=HYUw7gBAggTjCGBPAFAOnQbQLoEog&eslintrc=N4KABGBEBOCuA2BTAzpAXGYBfEWg&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
No response
tsconfig
No response
Expected Result
I expect that comparing
node.parent.type
toAST_NODE_TYPES.NewExpression
to be allowed whennode
isTSESTree.SpreadElement
, but it isn't because TypeScript errors.Actual Result
I get this error from TypeScript:
Additional Info
A couple similar but not identical issues related to this:
ArrayExpression
does not includeSpreadElement
as possible value of elements property #4963Versions
@typescript-eslint/eslint-plugin
8.6.0
@typescript-eslint/parser
8.6.0
@typescript-eslint/rule-tester
8.6.0
@typescript-eslint/scope-manager
8.6.0
@typescript-eslint/typescript-estree
8.6.0
@typescript-eslint/type-utils
8.6.0
@typescript-eslint/utils
8.6.0
TypeScript
5.5.3
ESLint
8.57.0
node
20.16.0
The text was updated successfully, but these errors were encountered: