import { FactoryFunction, FactoryFunctionOptions, HookFunction } from "./types"; /** * @export * @class Factory */ export declare class Factory { /** * @private * @type {Map} * @memberof Factory */ private readonly states; /** * @private * @type {Map>} * @memberof Factory */ private readonly hooks; /** * @private * @type {{ states: Set; attributes: object; options: FactoryFunctionOptions }} * @memberof Factory */ private readonly modifiers; /** * @param {string} state * @param {FactoryFunction} fn * @returns {boolean} * @memberof Factory */ state(state: string, fn: FactoryFunction): boolean; /** * @param {HookFunction} fn * @returns {void} * @memberof Factory */ afterMaking(fn: HookFunction): void; /** * @param {string} state * @param {HookFunction} fn * @returns {void} * @memberof Factory */ afterMakingState(state: string, fn: HookFunction): void; /** * @param {...string[]} states * @returns {this} * @memberof Factory */ withStates(...states: string[]): this; /** * @param {object} attributes * @returns {this} * @memberof Factory */ withAttributes(attributes: object): this; /** * @param {FactoryFunctionOptions} options * @returns {this} * @memberof Factory */ withOptions(options: FactoryFunctionOptions): this; /** * @template T * @param {boolean} [resetModifiers=true] * @returns {T} * @memberof Factory */ make(resetModifiers?: boolean): T; /** * @template T * @param {number} count * @returns {T[]} * @memberof Factory */ makeMany(count: number): T[]; /** * @private * @param {string} state * @param {HookFunction} fn * @returns {void} * @memberof Factory */ private registerHook; /** * @private * @param {string} state * @memberof Factory */ private assertKnownState; /** * @private * @template T * @param {string} state * @param {T} value * @memberof Factory */ private applyHooks; /** * @private * @memberof Factory */ private resetModifiers; } //# sourceMappingURL=factory.d.ts.map