2022-04-20 00:06:45 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/Forward.h>
|
2024-11-15 04:01:23 +13:00
|
|
|
#include <LibGC/Root.h>
|
2022-04-20 00:06:45 +02:00
|
|
|
#include <LibJS/Forward.h>
|
2022-10-01 17:16:22 +03:00
|
|
|
#include <LibJS/Runtime/Environment.h>
|
2022-04-20 00:06:45 +02: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 20:53:57 +02:00
|
|
|
ClassElementName name; // [[Name]]
|
|
|
|
Variant<GC::Ref<ECMAScriptFunctionObject>, Value, Empty> initializer; // [[Initializer]]
|
2022-04-20 00:06:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|