Skip to content

[RFC] AST structure of TSImportType to be more align with rest of AST #2998

@armano2

Description

@armano2

THIS IS BREAKING CHANGE

What is this change about?

TSImportType has boolean property isTypeOf that is inconsistent with other usages of typeof within AST structure.

isTypeOf property is unique (not used anywhere else in code)

type x = typeof import('x')
TSImportType:
  - isTypeOf: boolean
type x = typeof window
TSTypeQuery:
  - exprName: Identifier

Why we should change it?

  • Improve consistency of ast structure.
  • Align generated structure with babel representation
  • Allow consumers (eg. prettier) to correctly place comment - link
    typeof /* comment */ import('x')

Metadata

Metadata

Assignees

No one assigned

    Labels

    ASTPRs and Issues about the AST structureaccepting prsGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy