import { CyclicModuleRecord, SyntheticModuleRecord, AbstractModuleRecord, type ModuleRecordHostDefined, ModuleRecord } from '../modules.mts'; import { BooleanValue, ObjectValue, Value } from '../value.mts'; import { type PlainCompletion } from '../completion.mjs'; import { PromiseCapabilityRecord, type ArrayBufferObject } from './all.mts'; import { Realm, type ImportAttributeRecord, type ImportedNamesValue, type ModuleRequestRecord, type PlainEvaluator, type ScriptRecord, JSStringValue, type HostLoadImportedModulePayloadOpaque } from '#self'; /** https://tc39.es/proposal-deferred-reexports/#sec-MergeImportedNames */ export declare function MergeImportedNames(a: ImportedNamesValue, b: ImportedNamesValue): ImportedNamesValue; /** https://tc39.es/proposal-deferred-reexports/#sec-ExcludeImportedNames */ export declare function ExcludeImportedNames(a: ImportedNamesValue, b: ImportedNamesValue): ImportedNamesValue; /** https://tc39.es/proposal-deferred-reexports/#sec-ListAppendUnique */ export declare function ListAppendUnique(target: T[], items: Iterable): void; export interface PreviouslyImportedNamesEntry { readonly Module: AbstractModuleRecord; ImportedNames: ImportedNamesValue; } /** https://tc39.es/proposal-deferred-reexports/#sec-GetNewOptionalIndirectExportsModuleRequests */ export declare function GetNewOptionalIndirectExportsModuleRequests(module: AbstractModuleRecord, importedNames: ImportedNamesValue, previouslyImportedNames: PreviouslyImportedNamesEntry[]): readonly ModuleRequestRecord[]; export declare class GraphLoadingState { readonly PromiseCapability: PromiseCapabilityRecord; readonly HostDefined?: ModuleRecordHostDefined; IsLoading: boolean; readonly Visited: Set; PendingModules: number; readonly PreviouslyImportedNames: PreviouslyImportedNamesEntry[]; constructor({ PromiseCapability, HostDefined, PreviouslyImportedNames }: Pick & { PreviouslyImportedNames?: PreviouslyImportedNamesEntry[]; }); } /** https://tc39.es/ecma262/#sec-InnerModuleLoading */ export declare function InnerModuleLoading(state: GraphLoadingState, module: AbstractModuleRecord, importedNames: ImportedNamesValue | undefined, loadType: 'single' | 'recursive-load'): void; /** https://tc39.es/ecma262/#sec-ContinueModuleLoading */ export declare function ContinueModuleLoading(state: GraphLoadingState, moduleCompletion: PlainCompletion, importedNames: ImportedNamesValue, phase: 'source' | 'defer' | 'evaluation'): void; /** https://tc39.es/proposal-deferred-reexports/#sec-BuildLinkingList */ export declare function BuildLinkingList(linkingList: AbstractModuleRecord[], referrer: CyclicModuleRecord, moduleRequests: readonly ModuleRequestRecord[], previouslyImportedNames: PreviouslyImportedNamesEntry[]): void; /** https://tc39.es/ecma262/#sec-InnerModuleLinking */ export declare function InnerModuleLinking(module: AbstractModuleRecord, stack: CyclicModuleRecord[], index: number): PlainCompletion; /** https://tc39.es/proposal-deferred-reexports/#sec-ReadyForSyncExecution */ export declare function ReadyForSyncExecution(module: ModuleRecord, importedNames?: ImportedNamesValue, seen?: Set): BooleanValue; /** https://tc39.es/ecma262/#sec-EvaluateModuleSync */ export declare function EvaluateModuleSync(module: ModuleRecord, importedNames?: ImportedNamesValue): PlainEvaluator; /** https://tc39.es/ecma262/#sec-innermoduleevaluation */ export declare function InnerModuleEvaluation(module: AbstractModuleRecord, stack: CyclicModuleRecord[], index: number): PlainEvaluator; /** https://tc39.es/proposal-defer-import-eval/#sec-GatherAsynchronousTransitiveDependencies */ export declare function GatherAsynchronousTransitiveDependencies(module: ModuleRecord, seen?: Set): ModuleRecord[]; /** https://tc39.es/proposal-deferred-reexports/#sec-BuildEvaluationList */ export declare function BuildEvaluationList(evaluationList: ModuleRecord[], referrer: CyclicModuleRecord, moduleRequests: readonly ModuleRequestRecord[]): void; /** https://tc39.es/proposal-deferred-reexports/#sec-GatherAsynchronousTransitiveDependenciesForRequests */ export declare function GatherAsynchronousTransitiveDependenciesForRequests(referrer: CyclicModuleRecord, requests: readonly ModuleRequestRecord[], seen?: Set): ModuleRecord[]; /** https://tc39.es/ecma262/#sec-GetImportedModule */ export declare function GetImportedModule(referrer: CyclicModuleRecord, request: ModuleRequestRecord): AbstractModuleRecord; /** https://tc39.es/ecma262/#sec-FinishLoadingImportedModule */ export declare function FinishLoadingImportedModule(referrer: ScriptRecord | CyclicModuleRecord | Realm, moduleRequest: ModuleRequestRecord, payload: HostLoadImportedModulePayloadOpaque, result: PlainCompletion): void; /** https://tc39.es/ecma262/#sec-AllImportAttributesSupported */ export declare function AllImportAttributesSupported(attributes: readonly ImportAttributeRecord[]): string | undefined; /** https://tc39.es/ecma262/#sec-getmodulenamespace */ export declare function GetModuleNamespace(module: AbstractModuleRecord, phase: 'defer' | 'evaluation'): ObjectValue; /** https://tc39.es/ecma262/#sec-create-default-export-synthetic-module */ export declare function CreateDefaultExportSyntheticModule(defaultExport: Value): SyntheticModuleRecord; /** https://tc39.es/proposal-import-text/#sec-create-text-module */ export declare function CreateTextModule(source: JSStringValue): SyntheticModuleRecord; export declare function CreateBytesModule(arrayBuffer: ArrayBufferObject): SyntheticModuleRecord; //# sourceMappingURL=module-records.d.mts.map