Consider adding setting that only shows inlay hint parameter names for simple literals (string, number, bool)

Open
#45,295 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
tooling

Research direction

Start from the existing typescript.inlayHints.parameterNames.enabled setting and its current "literals" behavior. Trace how parameter-name hints are classified for string, number, bool, regexp, null, undefined, function, array, and object literals, then add coverage showing that the new setting includes only the intended simple literals.

Written by the indexing model from the issue text.

Description

Awaiting More Feedback Suggestion

Suggestion

🔍 Search Terms

  • inlay hints
  • parameter names
  • typescript.inlayHints.parameterNames.enabled

✅ Viability Checklist

N/A, tooling related

⭐ Suggestion

Add a new setting that only shows inlay hints for simple literals. This would include:

  • string
  • number
  • bool
  • regexp literal?
  • null?
  • undefined?

Currently the "typescript.inlayHints.parameterNames.enabled": "literals" setting also shows parameter name hints for function, array, and object literals

I imagine this new setting would be called something like: "typescript.inlayHints.parameterNames.enabled": "simpleLiterals", although better names welcome

Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/TypeScript

All issues in microsoft/TypeScript

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.