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

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

Closed
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
@armano2

Description

@armano2

THIS IS BREAKING CHANGE

What is this change about?

TSImportType has boolean propertyisTypeOf that is inconsistent with other usages oftypeof within AST structure.

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

typex=typeofimport('x')
TSImportType:  - isTypeOf: boolean
typex=typeofwindow
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


      [8]ページ先頭

      ©2009-2025 Movatter.jp