TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Inlay parameter hints don't account for trailing required parameters

Open Andarist opened this issue 1 year ago • 1 comments

🔎 Search Terms

inlay hints parameters rest spread argument

🕗 Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

N/A

💻 Code

/// <reference path="fourslash.ts" />

//// function test(...rest: [first: number, ...middle: string[], last: string]) {}
//// test(10, 'a', 'b', 'c')

verify.baselineInlayHints(undefined, {
  includeInlayParameterNameHints: "all",
  includeInlayFunctionParameterTypeHints: true,
});

🙁 Actual behavior

function test(...rest: [first: number, ...middle: string[], last: string]) {}
test(/* first: */10, /* ...middle: */'a', /* last: */'b', 'c')

🙂 Expected behavior

function test(...rest: [first: number, ...middle: string[], last: string]) {}
test(/* first: */10, /* ...middle: */'a', 'b', /* last: */'c')

Additional information about the issue

No response

Andarist avatar Sep 16 '24 07:09 Andarist

Hello @Andarist I started looking at this issue

dappduck avatar Sep 17 '24 08:09 dappduck