Skip to content

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

Closed
@brunnerh

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.

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