Skip to content

Hover hint is invalid if there are multiple type aliases with same parameters #38829

Closed
@zaki-yama

Description

@zaki-yama

TS Template added by @mjbvz

TypeScript Version: 3.9.3

Search Terms

  • quick info
  • alias / aliases

  • VSCode Version: 1.45.1
  • OS Version: Darwin x64 18.7.0

Steps to Reproduce:

  1. Write the following TypeScript code
type Foo = string | number;
type Bar = string | number;

function someFunc(params: {
  foo: Foo,
  bar: Bar,
}) {
  //
}

// then try to call the function `someFunc`
someFunc(

Here I defined two type aliases, Foo and Bar.
Both have the same parameters, string | number.

  1. Hover over the someFunc and show popup
  2. The expected type of parameter bar is Bar, but actually it was Foo

SS_2020-05-28_at_21_44_48

It's also happened in Signature help.

SS_2020-05-28_at_21_44_59

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design LimitationConstraints of the existing architecture prevent this from being fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions