tc39/proposal-decorators

addInitializer comment is outdated in README.md

camillobruni opened this issue · 1 comments

Currently we unconditionally create the addInitializer closuer in step 11 in 15.7.5 CreateDecoratorContextObject:

11. Let addInitializer be [CreateAddInitializerFunction](https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-createaddinitializerfunction)(initializers, decorationState).
12. Perform ! [CreateDataPropertyOrThrow](https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-createdatapropertyorthrow)(contextObj, "addInitializer", addInitializer).

However, the the README.md mentions the following:

addInitializer: Allows the user to add additional initialization logic. This is available for all decorators which operate per-class, as opposed to per-instance (in other words, decorators which do not have kind "field" - discussed in more detail below).

Which conflicts with the above statement.

This will be fixed by #525