Class AsyncCreatable<O>Abstract

A base class for classes that must be constructed and initialized asynchronously.

Type Parameters

  • O = object

Constructors

Methods

Constructors

  • Constructs a new AsyncCreatable instance. For internal and subclass use only. New subclass instances must be created with the static create method.

    Type Parameters

    • O = object

    Parameters

    • options: O

      An options object providing initialization params.

    Returns AsyncCreatable<O>

Methods

  • Asynchronously constructs and initializes a new instance of a concrete subclass with the provided options.

    Type Parameters

    Parameters

    • this: (new (opts: P) => T)
        • new (opts): T
        • Parameters

          • opts: P

          Returns T

    • options: P

      An options object providing initialization params to the async constructor.

    Returns Promise<T>