Class PojoConstructorAsync<Pojo, CtorInput>

Constructor methods for each of properties returns promise for { value } object.

Usage

const ctor = new PojoConstructorAsync<{ field: number }, number>({ field: async (input) => ({ value: input + 2 }) })
const obj = await ctor.pojo(2);
assert.strictEqual(obj.field, 4);

Type Parameters

  • Pojo extends object

  • CtorInput = unknown

Hierarchy

  • PojoConstructorAsync

Constructors

Properties

Methods

Constructors

Properties

options?: PojoConstructorAsyncOptions<Pojo, CtorInput>
pojoConstructor: PojoConstructorSyncAndAsync<Pojo, CtorInput>
props: PojoConstructorAsyncProps<Pojo, CtorInput>

Methods

Generated using TypeDoc