Skip to content

repl: add function signature hints#64610

Open
hemanth wants to merge 1 commit into
nodejs:mainfrom
hemanth:repl/signature-hints-new
Open

repl: add function signature hints#64610
hemanth wants to merge 1 commit into
nodejs:mainfrom
hemanth:repl/signature-hints-new

Conversation

@hemanth

@hemanth hemanth commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Split from #64443 per review feedback to use idiomatic single-feature PRs.

When the user types functionName(, the REPL displays the function's parameter list as a dimmed hint below the input line. Uses the V8 Inspector protocol with throwOnSideEffect: true for safety.

Requires preview to be enabled and the inspector to be available.

Refs: #48164

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem. labels Jul 19, 2026
@hemanth hemanth closed this Jul 19, 2026
@hemanth hemanth reopened this Jul 19, 2026
@avivkeller

Copy link
Copy Markdown
Member

@hemanth every time a PR is opened and closed it pings maintainers. May I suggest verifying the branch is correct before opening a PR?

When the user types `functionName(`, display the function's parameter
list as a dimmed hint below the input line. Uses the V8 Inspector
protocol with throwOnSideEffect for safety.

Refs: nodejs#48164
Signed-off-by: hemanth <hemanth.hm@gmail.com>
@hemanth
hemanth force-pushed the repl/signature-hints-new branch from b064b71 to 6beba0c Compare July 19, 2026 23:31
Comment thread doc/api/repl.md
Comment on lines +245 to +251
* **Keywords** (`const`, `let`, `function`, `if`, `return`, etc.): Magenta
* **Strings** (single-quoted, double-quoted, and template literals): Green
* **Numbers**: Yellow
* **Boolean literals** (`true`, `false`), `null`, `undefined`, `NaN`,
`Infinity`: Yellow
* **Regular expressions**: Red
* **Comments** (line and block): Gray

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* **Keywords** (`const`, `let`, `function`, `if`, `return`, etc.): Magenta
* **Strings** (single-quoted, double-quoted, and template literals): Green
* **Numbers**: Yellow
* **Boolean literals** (`true`, `false`), `null`, `undefined`, `NaN`,
`Infinity`: Yellow
* **Regular expressions**: Red
* **Comments** (line and block): Gray
* Keywords (`const`, `let`, `function`, `if`, `return`, etc.): Magenta
* Strings (single-quoted, double-quoted, and template literals): Green
* Numbers: Yellow
* Boolean literals (`true`, `false`), `null`, `undefined`, `NaN`,
`Infinity`: Yellow
* Regular expressions: Red
* Comments (line and block): Gray

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants