Skip to content

ExecutionFrame

ExecutionFrame provides the context for a single evaluation of an expression.

new ExecutionFrame(): ExecutionFrame

ExecutionFrame

activation(): Activation

activation returns the current activation stored by the frame.

Activation


activeAsyncCalls(): number

activeAsyncCalls returns the number of currently executing asynchronous bindings.

number


asPartialActivation(): PartialActivation | undefined

asPartialActivation returns the first partial activation visible from the current activation chain.

PartialActivation | undefined


asyncCall(id): AsyncCall | undefined

asyncCall returns registered call metadata by id.

number

AsyncCall | undefined


checkInterrupt(): boolean

checkInterrupt returns whether the shared frame context has been interrupted.

boolean


close(): void

close releases any frame-local state and aborts the shared signal on the root frame.

void


computeAsyncResult(options): Val

computeAsyncResult returns a cached result or registers an asynchronous invocation.

AsyncResultOptions

Val


inheritParentFrame(options): void

inheritParentFrame links a promoted frame to an existing parent frame and shared context.

InheritParentFrameOptions

void


isLocalVariable(name): boolean

isLocalVariable reports whether a name belongs to a local scope in the activation hierarchy.

string

boolean


parent(): Activation | undefined

parent proxies parent-activation lookup to the current activation.

Activation | undefined

Activation.parent


parentFrame(): ExecutionFrame | undefined

parentFrame returns the parent frame, if any.

ExecutionFrame | undefined


pop(): ExecutionFrame

pop returns the parent frame, or the frame itself when it has no parent.

ExecutionFrame


push(childActivation): ExecutionFrame

push creates a child frame whose activation resolves through the current frame first and the child second.

Activation

ExecutionFrame


resolveName(name): unknown

resolveName proxies name resolution to the current activation.

string

unknown

Activation.resolveName


root(): ExecutionFrame

root returns the root frame of this frame’s hierarchy.

ExecutionFrame


setActivationHierarchy(options): void

setActivationHierarchy replaces the current activation with an explicit parent-child hierarchy.

ActivationHierarchyOptions

void


setAsync(options): void

setAsync configures asynchronous call tracking on a context-enabled root frame.

AsyncFrameOptions

void


setContext(options): void

setContext configures interrupt tracking on the root frame.

FrameContextOptions

void


signal(): AbortSignal | undefined

signal returns the shared abort signal, if the frame has one.

AbortSignal | undefined


unwrap(): Activation

unwrap returns the current internal activation.

Activation


waitForAsyncCompletion(ids): Promise<void>

waitForAsyncCompletion waits for one unresolved call represented by the supplied unknown ids.

number[]

Promise<void>


static acquire(options): ExecutionFrame

acquire configures an inactive pooled frame for one root or child scope.

FrameReuseOptions

ExecutionFrame