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

IntelliSense signature help forgets inferred parameter names in completed call #32036

Open
fatcerberus opened this issue Jun 22, 2019 · 0 comments
Labels
Bug A bug in TypeScript
Milestone

Comments

@fatcerberus
Copy link

fatcerberus commented Jun 22, 2019

Per #31845 (comment), posting this as a new ticket for posterity.

TypeScript Version: 3.6.0-dev.20190621

Search Terms: n/a

Code

function frob<T, A extends any[]>(f: (...args: A) => T, ...args: A)
{
    return f(...args);
}

function blub(foo: string, bar: number) {}

// press Ctrl+Shift+Space inside the parentheses here:
frob(blub, "banana slamma", 812);

Parameter names are correctly displayed while initially typing out the frob() function call:

image

However, once all the arguments are filled out, it reverts to generic names such as args_0, args_1, etc. ☹️

image

Expected behavior:
Parameter names originating from an inferred parameter tuple should be preserved in IntelliSense.

Actual behavior:
Parameter names are preserved while typing out the function call, but once the call is completed it reverts to using generic parameter names and remains that way for all subsequent invocations of signature help for that call (unless an argument is deleted).

Playground Link:
⏯ Click here

Related Issues:
#31845

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Jun 26, 2019
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants