@entity-factory/core
Version:
Create entities on the fly for mocking and testing
13 lines (12 loc) • 690 B
TypeScript
import { BlueprintOptions } from '../../blueprint/BlueprintOptions';
import { Adapter } from '../Adapter';
import { ObjectAdapterOptions } from './ObjectAdapterOptions';
import { ObjectBlueprintOptions } from './ObjectBlueprintOptions';
export declare class ObjectAdapter implements Adapter<ObjectBlueprintOptions> {
private readonly options;
private idCounter;
constructor(options?: ObjectAdapterOptions);
make<Entity = any>(objects: Array<Record<string, any>>, context: BlueprintOptions<ObjectBlueprintOptions>): Promise<Entity[]>;
create<Entity = any>(objects: Entity[], context: BlueprintOptions<ObjectBlueprintOptions>): Promise<Entity[]>;
private getNextId;
}