Type alias ContextInitializer

ContextInitializer: ((this, ctx) => void | Promise<void>)

Type declaration

    • (this, ctx): void | Promise<void>
    • Initializer function for a context

      Parameters

      • this: Context

        The context to initialize

      • ctx: Context

        The context to initialize

      Returns void | Promise<void>

      The result of the initializer function

      Example

      Context.current.init(function(ctx) {
      // ctx is available here via [this] keyword
      // Do something
      });

Generated using TypeDoc