Files
NapCatQQ/.pnpm-store/v3/files/7e/eb8d3793d1cfe120e9213852def139a3c94c3ce1b7f3dcaf02e456ff9b823017c0860c19d7f0663cdf3c6c7faa79c993f1b6db6a9ef3db9bd3dabd9c06acf6
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
670 B
Plaintext

/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* The base implementation of `_.delay` and `_.defer` which accepts `args`
* to provide to `func`.
*
* @private
* @param {Function} func The function to delay.
* @param {number} wait The number of milliseconds to delay invocation.
* @param {Array} args The arguments to provide to `func`.
* @returns {number|Object} Returns the timer id or timeout object.
*/
function baseDelay(func, wait, args) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return setTimeout(function() { func.apply(undefined, args); }, wait);
}
export default baseDelay;