Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Class and Class Element Decorators and
accessor
Keyword
Updates - Refactor to use ClassElementDefinition more extensively - Separate parsing class elements and defining them so that we can control the order of definition and decorator application - Extract and centralize class element decoration into a single place - Fix completions in ClassDefinitionEvaluation (need to reset the env after each possible abrupt completion). - Refactor adding private methods to instance to pull directly from `Class.[[Elements]]`, so we don't have multiple sources of truth for the elements that are defined on a class. `Class.[[Elements]]` is the canonical source of truth after ClassDefinitionEvaluation, and any operations afterward such as instantiation should base themselves on that. - Refactor to use anonymous function syntax. Non-normative fixes Fixes based on feedback from @jmdyck Remove dynamic [[HomeObject]] from decorator return values Throw an error if the value passed to `addInitializer` is not callable Set the name of the `addInitializer` function Remove setFunctionName from decorator application Call decorators with their natural `this` value. For more details, see this issue: tc39/proposal-decorators#487 Reverse initializer order Update field and accessor extra initializers to run after definition
- Loading branch information