Implements

Implemented by

Constructors

  • Returns Stack

  • Parameters

    Returns Stack

  • Parameters

    Returns Stack

  • Parameters

    Returns Stack

  • Parameters

    Returns Stack

  • Parameters

    Returns Stack

  • Parameters

    Returns Stack

Properties

awaitPromise: AwaitPromiseInfo[]

a list of promises to resolve in an 'async' scope as 'async function'

forAwaitAsyncIterable?: AsyncIterableInfo

resolve await promise in 'await for in' scope

moduleScope?: ModuleScope
moduleSource?: string
onDestroyActions: () => void[]
stack: Scope<any>[]

Methods

  • clear every thing after this scope, but not this scope

    Type Parameters

    Parameters

    Returns boolean

  • clear every thing after this scope, and even this scope

    Type Parameters

    Parameters

    Returns boolean

  • create new stack instance with the same reference to the current scope array

    Returns Stack

  • declare variable at last scope in the stack,

    Parameters

    • propertyKey: PropertyKey

      the name of property mey be string | number | symbol,

    • OptionalpropertyValue: any

      if not exist will be initialize with 'undefined' value

    Returns any

  • used when want to update ui-view like, you want to replace an array with another without reflect changes on view until reattached again.

    Returns void

  • Returns void

  • get context object of this provider, search for the first context object that has propertyKey.

    search for the first context that have property key, if not found will return the stack local scop as a default value

    Type Parameters

    Parameters

    • propertyKey: PropertyKey

      the property key

    Returns Scope<T>

  • get the first value for provided property key,

    will search current stack in all scope till find the first key, else undefined

    Parameters

    • propertyKey: PropertyKey

    Returns any

  • get the current module for this stack.

    used with export statement

    Returns undefined | ModuleScope

  • is this stack has a propertyKey

    Parameters

    • propertyKey: PropertyKey

    Returns boolean

  • import module scope from another stack, by the help of ModuleScopeResolver.

    used with import statement

    Parameters

    • source: string
    • OptionalimportCallOptions: ImportCallOptions

    Returns ModuleScope

  • get a reference to the last scope in this stack

    Type Parameters

    Returns Scope<T>

  • register action to do on destroy this stack

    Parameters

    • action: () => void

    Returns void

  • Type Parameters

    Returns Scope<T>

  • Type Parameters

    Returns Scope<T>

  • Type Parameters

    Parameters

    • context: T

    Returns Scope<T>

  • Type Parameters

    Parameters

    Returns void

  • apply all the not emitted changes, and continue emit in time.

    Returns void

  • Type Parameters

    Parameters

    Returns void

  • set the value of propertyKey in its context provider with value. else define it in the first scope 'local scope'

    Parameters

    • propertyKey: PropertyKey
    • value: any
    • Optionalreceiver: any

    Returns boolean

  • Parameters

    Returns Stack

  • Parameters

    Returns Stack