ClassFieldDefinition.h 558 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Forward.h>
  8. #include <LibJS/Forward.h>
  9. namespace JS {
  10. using ClassElementName = Variant<PropertyKey, PrivateName>;
  11. // 6.2.10 The ClassFieldDefinition Record Specification Type, https://tc39.es/ecma262/#sec-classfielddefinition-record-specification-type
  12. struct ClassFieldDefinition {
  13. ClassElementName name; // [[Name]]
  14. Handle<ECMAScriptFunctionObject> initializer; // [[Initializer]]
  15. };
  16. }