Unused Function Parameters ?
Proposal details
- Stage: Unstaged
- Status: Inactive
- ECMAScript edition: —
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
Proposal overview
This proposal addresses the problem of unused function parameters in JavaScript, which currently require placeholder names like _ that may conflict with existing code or linters. It explores three main solutions: elisions (empty parameter slots), placeholder syntax (e.g., ? or *), and a placeholder identifier (e.g., _) with early error rules. The proposal is at an early exploratory stage, presenting multiple design options without a selected direction.
Note
The README below comes from the upstream repository and may contain outdated stage or status metadata. Use the proposal details above as the current source of truth.
Unused Function Parameters
The Problem
Solutions
Elisions
- Matches with existing destructuring
([, c])is already valid
- Some might say it looks weird
Placeholder Syntax
- Most explicit, clearly "using up" a parameter without binding it
- Requires more syntax
Placeholder Identifier
- Arguably most natural, other languages use this (C#, Rust, etc.)
- Any valid identifiers are already valid identifiers, could conflict with existing code