source: node_modules/es-toolkit/dist/compat/function/defer.d.mts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 533 bytes
Line 
1/**
2 * Defers invoking the `func` until the current call stack has cleared. Any additional arguments are provided to func when it's invoked.
3 *
4 * @param {(...args: any[]) => any} func The function to defer.
5 * @param {...any[]} args The arguments to invoke `func` with.
6 * @returns {number} Returns the timer id.
7 *
8 * @example
9 * defer(console.log, 'deferred');
10 * // => Logs 'deferred' after the current call stack has cleared.
11 */
12declare function defer(func: (...args: any[]) => any, ...args: any[]): number;
13
14export { defer };
Note: See TracBrowser for help on using the repository browser.