The Wayback Machine - https://web.archive.org/web/20250503181840/https://github.com/microsoft/TypeScript/issues/45112
Skip to content

Should 'Suppress When Argument Matches Name' for parameter name inlay hints also apply to property names? #45112

Closed
@mjbvz

Description

@mjbvz

Bug Report

🔎 Search Terms

  • inlay hints
  • parameter hints

🕗 Version & Regression Information

4.4, not a regression

💻 Code

Turn on parameter name hints for the code:

function foo(bar: string) { }

const o = { bar: 'abc' }

foo(o.bar);

🙁 Actual behavior

Currently you do get a hint:
Screen Shot 2021-07-19 at 1 51 15 PM

🙂 Expected behavior

I wonder if we should tread this case like foo(bar) instead, which does not generate a hint due to the "typescript.inlayHints.parameterNames.suppressWhenArgumentMatchesName": true setting?

Thoughts?

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: Inlay HintsFix AvailableA PR has been opened for this issueFixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions