import { Pool } from './Pool'; import type { PoolItem, PoolItemConstructor } from './Pool'; /** * A type alias for a constructor of a Pool. * @template T The type of items in the pool. Must extend PoolItem. * @memberof utils */ export type PoolConstructor = new () => Pool; /** * A group of pools that can be used to store objects of different types. * @memberof utils */ export declare class PoolGroupClass { /** * A map to store the pools by their class type. * @private */ private readonly _poolsByClass; /** * Prepopulates a specific pool with a given number of items. * @template T The type of items in the pool. Must extend PoolItem. * @param {PoolItemConstructor} Class - The constructor of the items in the pool. * @param {number} total - The number of items to add to the pool. */ prepopulate(Class: PoolItemConstructor, total: number): void; /** * Gets an item from a specific pool. * @template T The type of items in the pool. Must extend PoolItem. * @param {PoolItemConstructor} Class - The constructor of the items in the pool. * @param {unknown} [data] - Optional data to pass to the item's constructor. * @returns {T} The item from the pool. */ get(Class: PoolItemConstructor, data?: unknown): T; /** * Returns an item to its respective pool. * @param {PoolItem} item - The item to return to the pool. */ return(item: PoolItem): void; /** * Gets a specific pool based on the class type. * @template T The type of items in the pool. Must extend PoolItem. * @param {PoolItemConstructor} ClassType - The constructor of the items in the pool. * @returns {Pool} The pool of the given class type. */ getPool(ClassType: PoolItemConstructor): Pool; /** gets the usage stats of each pool in the system */ stats(): Record; } export declare const BigPool: PoolGroupClass;