Container for an instance of an extension of the specified type.

Type Parameters

Hierarchy

  • ExtensionInstance

Implements

Constructors

  • Creates a container for an instance of an extension of the specified type.

    Type Parameters

    Parameters

    • factory: (() => E)

      A callback returning an instance of an extension of the specified type.

        • (): E
        • Returns E

    • factoryAsync: (() => Promise<E>)

      A callback returning an instance of an extension of the specified type.

        • (): Promise<E>
        • Returns Promise<E>

    • extensionName: string

      The name of the extension instance of the specified type.

    • extensionType: string

      Name of the extension instance type.

    • stage: ExtensionStage

      The stage of the extension execution in the extension chain.

    • order: number

      The order of execution, taking into account the type of extension and the stage of execution.

    • singleton: boolean

      A flag indicating the lifetime of an instance of extensions.

    • Optional when: ExtensionRegisterPredicate<Extension<ExtensionContext>, ExtensionContext>[]

      Array of functions that accept the context of extension execution and allowing extensions to be performed only under certain conditions.

    Returns ExtensionInstance<E>

Properties

extensionName: string

Name of the extension instance of the specified type.

extensionType: string

Name of the extension instance type.

order: number

The order of execution, taking into account the type of extension and the stage of execution.

singleton: boolean

Flag indicating the lifetime of an instance of extensions. If `true', then the lifetime of the extension instance will coincide with the lifetime of the maintainer.

The stage of extension execution in the extension chain.

Array of functions accepting the context of extensions execution and allowing extensions to be performed only under certain conditions.

Methods

  • Releases all related objects.

    Returns void

  • Returns an instance of an extension of the specified type.

    Returns E

  • Returns an instance of an extension of the specified type.

    Returns Promise<E>

Generated using TypeDoc