@garfish/utils
Advanced tools
Comparing version 1.13.4 to 1.13.5
@@ -444,5 +444,5 @@ // src/utils.ts | ||
} | ||
function macroTask(value) { | ||
function macroTask(value, time = 0) { | ||
return new Promise((resolve) => { | ||
setTimeout(() => resolve(value)); | ||
setTimeout(() => resolve(value), time); | ||
}); | ||
@@ -449,0 +449,0 @@ } |
@@ -51,3 +51,3 @@ import { interfaces } from '@garfish/core'; | ||
declare function getSourceURL(url: string | URL | Request): string; | ||
declare function macroTask<T extends any>(value: T): Promise<T>; | ||
declare function macroTask<T extends any>(value: T, time?: number): Promise<T>; | ||
@@ -54,0 +54,0 @@ declare class Queue { |
@@ -552,5 +552,5 @@ var __create = Object.create; | ||
} | ||
function macroTask(value) { | ||
function macroTask(value, time = 0) { | ||
return new Promise((resolve) => { | ||
setTimeout(() => resolve(value)); | ||
setTimeout(() => resolve(value), time); | ||
}); | ||
@@ -557,0 +557,0 @@ } |
{ | ||
"name": "@garfish/utils", | ||
"version": "1.13.4", | ||
"version": "1.13.5", | ||
"description": "utils module.", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@garfish/core": "1.13.4" | ||
"@garfish/core": "1.13.5" | ||
}, | ||
@@ -33,0 +33,0 @@ "publishConfig": { |
88056