import type { Instance } from './Instance.js'; type Instance_ = Omit; export type Pool = Pick, 'entries' | 'keys' | 'forEach' | 'get' | 'has' | 'size' | 'values'> & { _internal: { instance: Instance_ | ((key: key) => Instance_); }; destroy(key: key): Promise; destroyAll(): Promise; restart(key: key): Promise; start(key: key, options?: { port?: number | undefined; } | undefined): Promise; stop(key: key): Promise; stopAll(): Promise; }; /** * Defines an instance pool. Instances can be started, cached, and stopped against an identifier. * * @example * ``` * const pool = Pool.define({ * instance: anvil(), * }) * * const instance_1 = await pool.start(1) * const instance_2 = await pool.start(2) * const instance_3 = await pool.start(3) * ``` */ export declare function define(parameters: define.Parameters): define.ReturnType; export declare namespace define { type Parameters = { /** Instance for the pool. */ instance: Instance | ((key: key) => Instance); /** The maximum number of instances that can be started. */ limit?: number | undefined; }; type ReturnType = Pool; } export {}; //# sourceMappingURL=Pool.d.ts.map