Class Fields (Private instance methods and accessors, Class Public Instance Fields & Private Instance Fields, Static class fields and private static methods) S4
- Stage: Stage 4
- Status: Finished
- ECMAScript edition: ES2022
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
This proposal addresses the need for private instance methods, accessors, and static methods in JavaScript classes, which were previously unavailable. It was consolidated into the broader class fields proposal, which also covers public and private instance fields and static fields. The repository is now a historical archive, with the canonical source of truth moved to the combined proposal repository.
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.
This proposal has been merged into the class fields proposal.
Please see that repository for current status. The rest of this repository is left up as a historical archive. The old readme is available here, but will not be kept up to date. Similarly, while the FAQ in this repository will continue to exist as is, it will not be updated; its canonical location incluing any updates is in the class fields repository.