UNPKG

typeorm-stubs

Version:
17 lines (16 loc) 656 B
import { StubGenerator, ObjectType, StubOptions } from './interfaces'; /** * Stub creator. * */ export declare class Stub { private readonly parser; private readonly generator; /** * If you want to override the behavior of some Generator methods, * pass a class that implements the "StubGenerator" interface. * */ constructor(generator?: StubGenerator); createOne<T extends object>(entity: ObjectType<T>, options?: StubOptions): T; createMany<T extends object>(entity: ObjectType<T>, options: StubOptions): T[]; createMany<T extends object>(entity: ObjectType<T>, count?: number, options?: StubOptions): T[]; }