Microsoft/TypeScript

Inlay parameter hints don't account for trailing required parameters

Open

#59,979 创建于 2024年9月16日

在 GitHub 查看
 (1 评论) (1 反应) (0 负责人)TypeScript (6,726 fork)batch import
7.0 LS MigrationBugDomain: LS: Inlay HintsHelp Wanted

仓库指标

Star
 (48,455 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 9 个 PR)

描述

🔎 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

贡献者指南