Skip to content

Inconsistent QuickInfo on type-only imported symbols #47134

Closed
@lowr

Description

@lowr

Bug Report

🔎 Search Terms

type-only import quickinfo modifier specifier

🕗 Version & Regression Information

  • I was unable to test this on prior versions because the type modifier on import names had only been introduced in the latest version.

⏯ Playground Link

bug workbench

💻 Code

// @filename: lib.ts
export type A = number;
export type B = number;
export const A = 42;
export const B = 42;

// @filename: main.ts
import type { A } from "./lib";
import { type B } from "./lib";

🙁 Actual behavior

Hovering on A in the import statement gives you:

(alias) type A = string
import A

🙂 Expected behavior

Hovering on A gives you:

(alias) type A = string
(alias) const A: 42
import A

like hovering on B does, because you can use A as a value as long as it's in type contexts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Quick Infoe.g. hover text, tool-tips, and tooltips.Help WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions