2022-04-19 19:06:45 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/Forward.h>
|
2024-11-14 12:01:23 -03:00
|
|
|
#include <LibGC/Root.h>
|
2022-04-19 19:06:45 -03:00
|
|
|
#include <LibJS/Forward.h>
|
2022-10-01 11:16:22 -03:00
|
|
|
#include <LibJS/Runtime/Environment.h>
|
2022-04-19 19:06:45 -03:00
|
|
|
|
|
|
|
|
namespace JS {
|
|
|
|
|
|
|
|
|
|
using ClassElementName = Variant<PropertyKey, PrivateName>;
|
|
|
|
|
|
|
|
|
|
// 6.2.10 The ClassFieldDefinition Record Specification Type, https://tc39.es/ecma262/#sec-classfielddefinition-record-specification-type
|
|
|
|
|
struct ClassFieldDefinition {
|
2025-04-01 15:53:57 -03:00
|
|
|
ClassElementName name; // [[Name]]
|
|
|
|
|
Variant<GC::Ref<ECMAScriptFunctionObject>, Value, Empty> initializer; // [[Initializer]]
|
2022-04-19 19:06:45 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|