- reuse<T extends AsyncFunction>(
runner: T,
duration?: number,
maxHandles?: number,
): T & {
__wrap_global__: {
duration: number;
handles: LRUMap<string, { timeout: number; value: any }>;
};
} Parameters
- runner: T
- duration: number = 1000
- maxHandles: number = 1000
Returns T & {
__wrap_global__: {
duration: number;
handles: LRUMap<string, { timeout: number; value: any }>;
};
}
reuse values in specific duration for async functions