Class PojoConstructorSync<Pojo, CtorInput>

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

Usage

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

Type Parameters

  • Pojo extends object

  • CtorInput = unknown

Hierarchy

  • PojoConstructorSync

Constructors

Properties

Methods

Constructors

Properties

options?: PojoConstructorSyncOptions<Pojo, CtorInput>
pojoConstructor: PojoConstructorSyncAndAsync<Pojo, CtorInput>
props: PojoConstructorSyncProps<Pojo, CtorInput>

Methods

Generated using TypeDoc