Skip to content

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

Closed

Description

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.

Activity

  1. locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: LS: Signature HelpInformation in editor tooltips when invoking a function callHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions