This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/compat/function/defer.d.ts
T

15 lines
533 B
TypeScript

/**
* Defers invoking the `func` until the current call stack has cleared. Any additional arguments are provided to func when it's invoked.
*
* @param {(...args: any[]) => any} func The function to defer.
* @param {...any[]} args The arguments to invoke `func` with.
* @returns {number} Returns the timer id.
*
* @example
* defer(console.log, 'deferred');
* // => Logs 'deferred' after the current call stack has cleared.
*/
declare function defer(func: (...args: any[]) => any, ...args: any[]): number;
export { defer };