ClassFieldDefinition.h 589 B

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