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

Incorrect parameter hint is highlighted when arguments contain spread syntax #48260

Closed
jespertheend opened this issue Mar 14, 2022 · 0 comments Β· Fixed by #56372
Closed

Incorrect parameter hint is highlighted when arguments contain spread syntax #48260

jespertheend opened this issue Mar 14, 2022 · 0 comments Β· Fixed by #56372
Labels
Bug A bug in TypeScript Domain: Signature Help Information in editor tooltips when invoking a function call Help Wanted You can do this
Milestone

Comments

@jespertheend
Copy link
Contributor

Bug Report

πŸ”Ž Search Terms

parameter hints spread

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about spread

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

function myFn(a1: number, a2: number, a3: number) {

}

const firstTwoArgs = [1, 2] as const;

// Put your caret here and press ctrl/cmd + shift + space
//                   ||
//                   \/
myFn(...firstTwoArgs,  );

πŸ™ Actual behavior

a2 is highlighted:
image

πŸ™‚ Expected behavior

a3 is highlighted

Related issues

This is not to be confused with #47327, which is about inlay hints rather than parameter hints. Though possibly the same fix might apply here as well.

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Help Wanted You can do this Domain: Signature Help Information in editor tooltips when invoking a function call labels Mar 14, 2022
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Signature Help Information in editor tooltips when invoking a function call Help Wanted You can do this
Projects
None yet
2 participants