proposal-private-methods VS proposal-private-declarations

Compare proposal-private-methods vs proposal-private-declarations and see what are their differences.

proposal-private-methods

Private methods and getter/setters for ES6 classes (by tc39)

proposal-private-declarations

A proposal to allow trusted code _outside_ of the class lexical scope to access private state (by tc39)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
proposal-private-methods proposal-private-declarations
8 1
344 25
- -
2.7 0.0
over 2 years ago over 4 years ago
HTML HTML
- MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

proposal-private-methods

Posts with mentions or reviews of proposal-private-methods. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-04-22.

proposal-private-declarations

Posts with mentions or reviews of proposal-private-declarations. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-02-21.
  • What is the current state of private fields in ES6 classes?
    8 projects | /r/learnjavascript | 21 Feb 2021
    There one or two additional addon specs like Private Declarations, but the other private specs are not dependent on this. I believe, and I haven't been keeping up with them as much lately (they've been hanging at stage 3 for sooo long), that brand checks was something they wanted to have ready before the rest going out.

What are some alternatives?

When comparing proposal-private-methods and proposal-private-declarations you can also consider the following projects:

proposal-class-fields - Orthogonally-informed combination of public and private fields proposals

proposal-static-class-features - The static parts of new class features, in a separate proposal

proposal-symbols-as-weakmap-keys - Permit Symbols as keys in WeakMaps, entries in WeakSets and WeakRefs, and registered in FinalizationRegistries

proposals - Tracking ECMAScript Proposals

proposal-private-fields-in-in - EcmaScript proposal to provide brand checks without exceptions

proposal-record-tuple - ECMAScript proposal for the Record and Tuple value types. | Stage 2: it will change!