Repository URL to install this package:
|
Version:
6.0.4 ▾
|
import { PooledClass } from '../_typings';
/**
* Static poolers. Several custom versions for each potential number of
* arguments. A completely generic pooler is easy to implement, but would
* require accessing the `arguments` object. In each of these, `this` refers to
* the Class itself, not an instance. If any others are needed, simply add them
* here, or in their own files.
*
* @since 5.0.0
* @memberOf pooler
*
* @param copyFieldsFrom obj with instance pool (arguments for constructor?)
* @return instance of Klass
*
* @example
*
* class Eh {}
* addPoolingTo(Eh)
* const eh = Eh.getPooled() //=> oneArgumentPooler(Eh)
* eh.release()
*
*/
declare function oneArgumentPooler<This extends PooledClass>(this: This, copyFieldsFrom?: any): InstanceType<This> | any;
export default oneArgumentPooler;