Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ExecutionContext

Represents the current runtime execution context. This is exposed via a zone-local variable, and the Runtime populates it with useful information as it becomes available.

Hierarchy

  • ExecutionContext

Index

Properties

Accessors

Methods

Properties

application

application: Application = null

Retrieve the Alterior application which is currently being executed. If an application has not been bootstrapped yet, the value is null.

Static Readonly ZONE_LOCAL_NAME

ZONE_LOCAL_NAME: "@alterior/runtime:ExecutionContext" = "@alterior/runtime:ExecutionContext"

Accessors

Static current

Methods

run

  • run<T>(callback: () => Promise<T>): Promise<T>
  • Execute the given function in a new zone which has this ExecutionContext instance as the current execution context.

    Type parameters

    • T

    Parameters

    • callback: () => Promise<T>
        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>

runSync

  • runSync<T>(callback: () => T): T
  • Type parameters

    • T

    Parameters

    • callback: () => T
        • (): T
        • Returns T

    Returns T

Generated using TypeDoc