Skip to content

Organize imports removes type imports that are only referenced in @link (jsdoc)Β #47753

Closed

Description

@brunnerh

Bug Report

πŸ”Ž Search Terms

organize imports link

πŸ•— Version & Regression Information

As far as I know this is the behavior ever since @link support was added.

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

/// <refenrece types="zod"/>
import type { ZodType } from 'zod';

/** Intended to be used in combination with {@link ZodType} */
export function fun() { /* ... */ }

πŸ™ Actual behavior

Import is shown as not being used and gets removed on executing "Organize imports".

πŸ™‚ Expected behavior

Keep it.

Activity

  1. komyg commented on Feb 9, 2022

    @komyg
    Contributor

    Hi Ryan Cavanaugh (@RyanCavanaugh), I would like to help out on this. Could you assign this issue to me?

  2. komyg commented on Feb 17, 2022

    @komyg
    Contributor

    Hi, the PR is ready for review. Please let me know what you think.

  3. DanielSWolf commented on Mar 15, 2022

    @DanielSWolf

    This is related to #47558.

  4. added a commit that references this issue on Apr 29, 2022
    fd06132
  5. locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions