Destructure Private Fields S2
- Stage: Stage 2
- Status: Active
- ECMAScript edition: —
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
This proposal enables destructuring private fields, allowing developers to extract private class fields into local variables using syntax like const { #x: x } = this. It avoids reification issues by being syntax-only and excludes shorthand syntax following committee decisions.
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.
proposal-destructuring-private
A proposal to integrate private fields and destructuring.
Champions
- Justin Ridgewell (@jridgewell)
Status
Current Stage: 2
Motivation
Destructuring is a popular feature to store local references to an object's properties. Private Field's proposal targeted the minimum features needed to support the goal of private properties in class instances. Unfortunately, this left destructuring out.
This proposal avoids questions of reification of Private Fields by
limiting this to syntax only. It also doesn't need to worry about
"shorthand" syntax (#x in an expression being shorthand for
this.#x), because the Committee has decided we will not persue
shorthand syntax after the Ergonomic Brand Checks
Proposal.