Skip to content

Inlay parameter hints don't account for trailing required parametersΒ #59979

@Andarist

Description

@Andarist

πŸ”Ž 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions