@rushstack/node-core-library
Advanced tools
Comparing version 4.2.1 to 4.3.0
@@ -153,2 +153,6 @@ /** | ||
*/ | ||
static sleepAsync(ms: number): Promise<void>; | ||
/** | ||
* @deprecated Use {@link Async.sleepAsync} instead. | ||
*/ | ||
static sleep(ms: number): Promise<void>; | ||
@@ -155,0 +159,0 @@ /** |
@@ -24,2 +24,3 @@ "use strict"; | ||
[Symbol.asyncIterator]: () => ({ | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
next: async () => { | ||
@@ -122,3 +123,3 @@ // The await is necessary here, but TS will complain - it's a false positive. | ||
*/ | ||
static async sleep(ms) { | ||
static async sleepAsync(ms) { | ||
await new Promise((resolve) => { | ||
@@ -129,2 +130,9 @@ setTimeout(resolve, ms); | ||
/** | ||
* @deprecated Use {@link Async.sleepAsync} instead. | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
static async sleep(ms) { | ||
await Async.sleepAsync(ms); | ||
} | ||
/** | ||
* Executes an async function and optionally retries it if it fails. | ||
@@ -144,3 +152,3 @@ */ | ||
else if (retryDelayMs > 0) { | ||
await Async.sleep(retryDelayMs); | ||
await Async.sleepAsync(retryDelayMs); | ||
} | ||
@@ -147,0 +155,0 @@ } |
@@ -231,3 +231,3 @@ "use strict"; | ||
} | ||
await Async_1.Async.sleep(interval); | ||
await Async_1.Async.sleepAsync(interval); | ||
return retryLoop(); | ||
@@ -234,0 +234,0 @@ }; |
{ | ||
"name": "@rushstack/node-core-library", | ||
"version": "4.2.1", | ||
"version": "4.3.0", | ||
"description": "Core libraries that every NodeJS toolchain project should use", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1048805
13533