microsoft / microsoft/TypeScript

Change quick fix JSDoc Import

Open
#59,435 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

When adding a JSDoc comment within a .js file, such as /** @type {Entity} */, using the quick fix feature will promptly import the Entity module using the standard ECMAScript Module (ESM) syntax. However, I recommend that, when within the JSDoc comment, the import be handled using the newly released @import statement for better compatibility and clarity.

Example:

image

image

Will result in:
image

Result that would be nice:
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the quick fix that adds imports for types referenced in JSDoc comments in JavaScript files, then compare its current ESM output with the requested JSDoc @import form. Done means the quick fix produces the requested @import statement while preserving the existing type resolution behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.