8000 Enhancement: Remove `TSImportType.qualifier` and `TSImportType.typeArguments` · Issue #11615 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

Enhancement: Remove TSImportType.qualifier and TSImportType.typeArguments #11615

@fisker

Description

@fisker

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

typescript-estree

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

Currently, the following code has a totally different AST

type A = a          .b<x>
//       ^^^^^^^^^^^^^^^^ TSTypeReference
//       ^^^^^^^^^^^^^    TSTypeReference.typeName (`TSQualifiedName` with `Identifier` as `TSQualifiedName.left`)
//                     ^  TSTypeReference.typeArguments

type A = import('a').b<x>
//       ^^^^^^^^^^^^^^^^ TSImportType
//              ^^^       TSImportType.source
//                  ^^    TSImportType.qualifier
//                     ^  TSImportType.typeArguments

Do you think it make sense to change the second one to

type A = import('a').b<x>
//       ^^^^^^^^^^^^^^^^ TSTypeReference
//       ^^^^^^^^^^^^^    TSTypeReference.typeName (`TSQualifiedName` with `TSImportType` as `TSQualifiedName.left`)
//                     ^  TSTypeReference.typeArguments

?

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeThis change will require a new major version to be releasedenhancementNew feature or requesttriageWaiting for team members to take a look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0