babel / babel/proposals

Private Methods (and accessors) (Stage 3)

Open
#22 13 comments 1 reaction 0 assignees View on GitHub
Proposal Issue Transform: Done
Dominant language
No language data
Stars
435
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Champions: Daniel Ehrenberg @littledan
Spec Repo: https://github.com/littledan/proposal-private-methods
First presented at the July 2017 meeting: https://github.com/tc39/agendas/blob/master/2017/07.md
Moved to Stage 3 at the Sept 2017 meeting: https://docs.google.com/presentation/d/1aI89Jgl7CdtKV6D5-ydieUn_-kgRqAD2X8gGzh62xzc/edit#slide=id.p

Example:

```js
class Counter extends HTMLElement {
#xValue = 0;

get #x() { return this.#xValue; }
set #x(value) {
this.#xValue = value;
window.requestAnimationFrame(
this.#render.bind(this));
}

#clicked() {
this.#x++;
}
}
```

## Implementation

- Initial parser PR (https://github.com/babel/babylon/pull/703) by @Qantas94Heavy

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the private methods proposal repository and the initial parser PR linked under Implementation. Check the proposal's current status against this tracking issue and determine whether Babel has an outstanding implementation task. Done means the issue accurately records the remaining work or is updated to reflect the implementation status.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.