Iskra API Reference
    Preparing search index...

    Class AppContext

    app.context: a Map whose keys in AppContextRegistry ('db', 'kv', …) are typed; any other key holds unknown, or the type given as T.

    Hierarchy

    • Map<string, unknown>
      • AppContext
    Index
    • Parameters

      • Optionalentries: readonly (readonly [string, unknown])[] | null

      Returns AppContext

    • Parameters

      • Optionaliterable: Iterable<readonly [string, unknown], any, any> | null

      Returns AppContext

    • Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

      Type Parameters

      Parameters

      • key: K

      Returns AppContextRegistry[K] | undefined

      Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.

    • Type Parameters

      • T = unknown

      Parameters

      • key: string

      Returns T | undefined

    • Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

      Type Parameters

      Parameters

      Returns this

    • Parameters

      • key: string
      • value: unknown

      Returns this