ClassFieldDefinition.h 628 B

123456789101112131415161718192021222324
  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. #include <LibJS/Heap/Handle.h>
  10. #include <LibJS/Runtime/Environment.h>
  11. namespace JS {
  12. using ClassElementName = Variant<PropertyKey, PrivateName>;
  13. // 6.2.10 The ClassFieldDefinition Record Specification Type, https://tc39.es/ecma262/#sec-classfielddefinition-record-specification-type
  14. struct ClassFieldDefinition {
  15. ClassElementName name; // [[Name]]
  16. Handle<ECMAScriptFunctionObject> initializer; // [[Initializer]]
  17. };
  18. }