Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't repeat inferred generic types in quick-info #14664

Closed
ghost opened this issue Mar 15, 2017 · 1 comment
Closed

Don't repeat inferred generic types in quick-info #14664

ghost opened this issue Mar 15, 2017 · 1 comment
Labels
Duplicate An existing issue was already created

Comments

@ghost
Copy link

ghost commented Mar 15, 2017

TypeScript Version: nightly (2.3.0-dev.20170314)

Code

[1, 2, 3].map(n => ({ x: n, y: n }));

Hover over map.

Expected behavior:

(method) Array<number>.map<U>(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[] (+ 4 overloads)
(inferred) U = {
	x: number;
	y: number;
}

Actual behavior:

(method) Array<number>.map<{
    x: number;
    y: number;
}>(callbackfn: (value: number, index: number, array: number[]) => {
    x: number;
    y: number;
}, thisArg?: any): {
    x: number;
    y: number;
}[] (+4 overloads)

This is long enough that reading the documentation in VSCode's quick info window requires scrolling down!

Mentioned this to @DanielRosenwasser and @sandersn earlier today.

@ghost
Copy link
Author

ghost commented Mar 15, 2017

Not quite a duplicate of #14662, but strongly related. Although in this case I'm still suggesting showing all the type info, just not repeating it.

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label May 24, 2017
@DanielRosenwasser DanielRosenwasser added the Domain: Quick Info e.g. hover text, tool-tips, and tooltips. label May 24, 2018
@RyanCavanaugh RyanCavanaugh added Duplicate An existing issue was already created and removed Needs Investigation This issue needs a team member to investigate its status. Domain: Quick Info e.g. hover text, tool-tips, and tooltips. labels Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants