Skip to content

Commit cd7822c

Browse files
committed
maint(core utils): Dispatch - document postpone parameter.
Better document the postpone parameter of the dispatch method.
1 parent b2d0651 commit cd7822c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,10 @@ const timeout = (ms) => {
575575
* @param {Function} func - The function to debounce.
576576
* @param {Number} ms - The time in milliseconds to debounce.
577577
* @param {Object} timer - A module-global timer as an object.
578-
* @param {Boolean} postpone - If true, the function will be called after it stops being called for N milliseconds.
578+
* @param {Boolean} [postpone=true] - If true, the function will only be called
579+
* at the end, after it stops being called for N milliseconds. If false, the
580+
* function will be called no more than each [ms] milliseconds, ensuring that
581+
* the function isn't postponed for for too long.
579582
*
580583
* @returns {Function} - The debounced function.
581584
*/

0 commit comments

Comments
 (0)