UNPKG

@workingscorpion/class-faker

Version:

Class based Faker Object Generator for testing node.js inspired by Fakingoose

18 lines (15 loc) 590 B
interface FieldMetadata { name: string | symbol; type: any; arrayElementType?: any; nestedObjectType?: any; } declare function FakerField(nestedObjectType?: any, arrayElementType?: any): PropertyDecorator; declare function getFieldMetadata(target: any): FieldMetadata[]; type FieldOptions<T> = { type?: string; skip?: boolean; value?: T | (() => T); }; declare function generateStub<T extends Object>(cls: new () => T, configs?: Partial<Record<keyof T, FieldOptions<T[keyof T]>>>): T; export { FakerField, type FieldMetadata, generateStub, getFieldMetadata };