Bug: Inconsistent TSMappedType AST shape #11055
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
AST
PRs and Issues about the AST structure
bug
Something isn't working
package: typescript-estree
Issues related to @typescript-eslint/typescript-estree
Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
ast-spec
Playground Link
https://typescript-eslint.io/play/#ts=5.8.3&showAST=es&fileType=.ts&code=G4QwTgBCBcEN4QNoGsIEsB2UME8C6sIuEAvgFBmiQBGsCK6WR%2BA-IceZeBAMZ0RgApiAAmAewwAbHElSZs%2BdjM5UII-gGohoidNmMFeNgtIVVg-gFpt4qTIbzmBEySA&eslintrc=N4KABGBEBOCuA2BTAzpAXGYBfEWg&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=true
Repro Code
ESLint Config
tsconfig
Expected Result
The 1st TSMappedType should have properties
{ optional: false, readonly: undefined }
The 2nd TSMappedType should have property
{ readonly: undefined }
The 3rd TSMappedType should have property
{ optional: false }
The 5th TSMappedType should have property
{ optional: false }
Actual Result
The aforementioned TSMappedTypes are missing such properties, resulted to inconsistent AST shapes.
Additional Info
No response
Versions
@typescript-eslint/typescript-estree
8.29.1
The text was updated successfully, but these errors were encountered: