import { Value, ObjectValue, PrivateName, JSStringValue, UndefinedValue, type PropertyKeyValue, ReferenceRecord, SymbolValue } from '../value.mts'; import { type PlainEvaluator, type ValueEvaluator } from '../evaluator.mts'; import type { Location, ParseNode } from '../parser/ParseNode.mts'; import { type ECMAScriptFunctionObject, type BuiltinFunctionObject, type FunctionObject } from '#self'; export interface DefaultConstructorBuiltinFunction extends BuiltinFunctionObject { readonly PrivateMethods: ECMAScriptFunctionObject['PrivateMethods']; readonly Fields: ECMAScriptFunctionObject['Fields']; readonly Initializers: ECMAScriptFunctionObject['Initializers']; readonly Elements: ECMAScriptFunctionObject['Elements']; readonly SourceText: ECMAScriptFunctionObject['SourceText']; readonly ConstructorKind: ECMAScriptFunctionObject['ConstructorKind']; /** * Note: this is different than InitialName, which is used and observable in Function.prototype.toString. * This is only used in the inspector. */ readonly HostInitialName: PropertyKeyValue | PrivateName; readonly HostLocation: [scriptId: string | undefined, location: Location]; } /** https://tc39.es/ecma262/#sec-runtime-semantics-classdefinitionevaluation */ /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-runtime-semantics-classdefinitionevaluation */ export declare function ClassDefinitionEvaluation(ClassTail: ParseNode.ClassTail, classBinding: JSStringValue | UndefinedValue, className: PropertyKeyValue | PrivateName, sourceText: string, decorators: readonly DecoratorDefinitionRecord[]): ValueEvaluator; /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-decoratorevaluation */ export declare function DecoratorEvaluation(decorator: ParseNode.Decorator): PlainEvaluator; /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-decoratorelistvaluation */ export declare function DecoratorListEvaluation(decoratorList: readonly ParseNode.Decorator[]): PlainEvaluator; /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-createdecoratoraccessobject */ export declare function CreateDecoratorAccessObject(kind: ClassElementDefinitionRecord['Kind'], name: PropertyKeyValue | PrivateName): ObjectValue; /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-createaddinitializerfunction */ export declare function CreateAddInitializerFunction(initializers: FunctionObject[], decorationState: { Finished: boolean; }): FunctionObject; /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-createdecoratorcontextobject */ export declare function CreateDecoratorContextObject(kind: 'class' | ClassElementDefinitionRecord['Kind'], name: PropertyKeyValue | PrivateName, initializers: FunctionObject[], decorationState: { Finished: boolean; }, isStatic?: boolean): ObjectValue; /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-applydecoratorstoelementdefinition */ export declare function ApplyDecoratorsToElementDefinition(_homeObject: ObjectValue, elementRecord: ClassElementDefinitionRecord, extraInitializers: FunctionObject[], isStatic: boolean): PlainEvaluator; /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-applydecoratorstoclassdefinition */ export declare function ApplyDecoratorsToClassDefinition(classDef: FunctionObject, decorators: readonly DecoratorDefinitionRecord[], className: PropertyKeyValue | PrivateName, extraInitializers: FunctionObject[]): PlainEvaluator; /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-applydecoratorsanddefinemethod */ export declare function ApplyDecoratorsAndDefineMethod(homeObject: ObjectValue, methodDefinition: ClassElementDefinitionRecord, extraInitializers: FunctionObject[], isStatic: boolean): PlainEvaluator; /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-decoratordefinition-record-specification-type */ export interface DecoratorDefinitionRecord { readonly Decorator: Value; readonly Receiver: ReferenceRecord | Value; } /** https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-classfielddefinition-record-specification-type */ export type ClassElementDefinitionRecord = ClassElementDefinitionRecord_Method | ClassElementDefinitionRecord_Field | ClassElementDefinitionRecord_Accessor | ClassElementDefinitionRecord_Getter | ClassElementDefinitionRecord_Setter; export interface ClassElementDefinitionRecord_Method { readonly Kind: 'method'; readonly Key: PrivateName | JSStringValue | SymbolValue; Value: FunctionObject; Decorators: DecoratorDefinitionRecord[] | undefined; } export interface ClassElementDefinitionRecord_Field { readonly Kind: 'field'; readonly Key: PrivateName | JSStringValue | SymbolValue; Decorators: DecoratorDefinitionRecord[] | undefined; readonly Initializers: FunctionObject[]; readonly ExtraInitializers: FunctionObject[]; } export interface ClassElementDefinitionRecord_Accessor { readonly Kind: 'accessor'; readonly Key: PrivateName | JSStringValue | SymbolValue; Get: FunctionObject; Set: FunctionObject; readonly BackingStorageKey: PrivateName; Decorators: readonly DecoratorDefinitionRecord[] | undefined; readonly Initializers: FunctionObject[]; readonly ExtraInitializers: FunctionObject[]; } export interface ClassElementDefinitionRecord_Getter { readonly Kind: 'getter'; readonly Key: PrivateName | JSStringValue | SymbolValue; Get: FunctionObject; Decorators: readonly DecoratorDefinitionRecord[] | undefined; } export interface ClassElementDefinitionRecord_Setter { readonly Kind: 'setter'; readonly Key: PrivateName | JSStringValue | SymbolValue; Set: FunctionObject; Decorators: readonly DecoratorDefinitionRecord[] | undefined; } export declare const ClassElementDefinitionRecord: { (record: ClassElementDefinitionRecord): ClassElementDefinitionRecord; [Symbol.hasInstance](instance: unknown): instance is ClassElementDefinitionRecord; }; //# sourceMappingURL=ClassDefinitionEvaluation.d.mts.map