UNPKG

@websolute/faker.ts

Version:

Easy to Use, Powered by Decorators, Faker.js TypeScript Wrapper

20 lines (19 loc) 771 B
import { ClassReflector } from './class-reflector'; import { ClassLiteral, Class } from './types/fixture-options.type'; import { IClassProcessor } from './types/iclass-processor.interface'; import FakerStatic = Faker.FakerStatic; export declare class ClassProcessor<T> implements IClassProcessor<T> { private readonly faker; private readonly reflector; private static readonly VALUE_INSPECTORS; static readonly DEFAULT_LOCALE = "en"; constructor(faker: FakerStatic, reflector: ClassReflector, locale: string); private handlePropertyValue; /** * Return an object from the target class with all the properties * decorated by the 'Fixture' Decorator * * @param target */ process(target: Class<T>): ClassLiteral<T>; }