@backland/schema
Version:
TypeScript schema declaration and validation library with static type inference
14 lines (13 loc) • 461 B
TypeScript
import { Infer } from './Infer';
import { FieldInput } from './fields/_parseFields';
export type ObjectMockOptions = {
maxArrayLength?: number;
randomNumber?: () => number;
randomText?: () => string;
};
export declare function objectMock<T extends {
[K: string]: FieldInput;
}>(definition: T, options?: ObjectMockOptions): Infer<{
object: T;
}>;
export declare function fieldToMock(fieldInput: FieldInput, options?: ObjectMockOptions): any;