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

Feedback on 'import type' UX for editors #36038

Closed
Labels
DiscussionIssues which may not have code impact
@mjbvz

Description

@mjbvz

I just updated VS Code to build using TypeScript 3.8 nightly. From this, the VS Code team has some feedback on the UX around the newimport type syntax. I've captured some of our general feedback here. I'll also be opening issues for specific problems I've noticed

The... suggestions to convert imports toimport type feel intrusive

Currently, TypeScript returns a suggestion for every import that only imports types. These suggestions are rendered as... underlines by VS Code

We feel these suggestions are intrusive. In our understanding,import type seems like an advanced feature that is only really required in a few cases. There is nothing strictly wrong with using a normalimport since TS has always been smart enough not to generate an import in the emitted code.

I believe we should disable these suggestions and instead leave them to the linter.

Auto import should not useimport type

Currently, if you are only referencing a value as a type, auto import will try to import it usingimport type. This can get weird if you later try using the same symbol as a concrete value in the same file

Again, I believe that it would be better to add a standardimport and let users explicitly change it toimport type if they desire.

/cc@Tyriar@connor4312 for VS Code
/cc@minestarks@amcasey for other editor feedback

Metadata

Metadata

Assignees

No one assigned

    Labels

    DiscussionIssues which may not have code impact

    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