mocker-data-generator
Version:
A simplified way to generate mock data, builds using a simple schema and with the FakerJs
62 lines (61 loc) • 1.31 kB
TypeScript
import { CustomGeneratorRun } from './types';
export declare class Generator<T> {
name: string;
DB: {};
object: T;
schema: {
values: string[];
};
options: {
uniqueField: string;
max: number;
min: number;
};
virtualPaths: string[];
generators: {};
self(cfg: {
self: any;
eval?: boolean;
}): any;
db(cfg: {
eval?: boolean;
db: any;
}): any;
custom(cfg: {
generator: any;
input: string | RegExp;
run?: CustomGeneratorRun;
adapter?: (generator: any, input: string | RegExp) => any;
eval?: boolean;
}): any;
eval(cfg: {
eval: string;
}): any;
values(cfg: {
values: any[];
}): any;
function(cfg: {
function: any;
}, ...args: any[]): any;
static(cfg: {
static: any;
}): any;
incrementalId(cfg: {
incrementalId: number | true | string;
}): number;
hasOne(cfg: {
hasOne: string;
get?: string;
eval?: boolean;
uniqueDB?: any[];
}): null;
hasMany(cfg: {
min?: number;
max?: number;
hasMany: string;
amount?: number;
get?: string;
eval?: boolean;
unique?: boolean;
}): any;
}