import type { AbstractStore } from "./abstract-store.ts"; import { type Params, type ParamsOrFunc } from "./params.ts"; export type ShapeFor = F extends Factory ? S : never; interface FactoryClass { new (state: SharedState, params?: Params): Factory; } export type Context> = ReturnType; export interface FactoryContext { params?: Params | undefined; sequence: number; } export declare abstract class Factory { #private; protected abstract construct(): Shape; /** * **Do not call the constructor directly! Use {@link Factory.create} instead.** * * The constructor requires arguments that should not concern you. * It is only used internally for factory creation and refinement. It only has * to remain public in TypeScript to be able to extend a factory. * * @private */ constructor(state: SharedState, params?: Params); static create(this: FactoryClass>): This; get identifier(): symbol; protected get ctx(): Context; protected createContext(params?: Params): FactoryContext; reset(): void; refine(params: Params): this; build(params?: Params): Shape; buildMany(amount: number, params?: ParamsOrFunc): Shape[]; seed(store: AbstractStore, params?: Params): Promise; seedMany(store: AbstractStore, amount: number, params?: ParamsOrFunc): Promise; } declare class SharedState { #private; static initialSequence: number; readonly identifier: symbol; constructor(); next(): number; reset(): void; } export {}; //# sourceMappingURL=factory.d.ts.map