@vpmedia/simplify 1.73.0 → 1.74.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.74.0] - 2026-03-01
2
+
3
+ ### ⚙️ Miscellaneous Tasks
4
+
5
+ - Release
6
+ - Improve type checking for retryAsync
7
+ - *(release)* V1.74.0
1
8
  ## [1.73.0] - 2026-03-01
2
9
 
3
10
  ### 🚀 Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/simplify",
3
- "version": "1.73.0",
3
+ "version": "1.74.0",
4
4
  "description": "@vpmedia/simplify",
5
5
  "author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
6
6
  "license": "MIT",
package/src/util/async.js CHANGED
@@ -12,10 +12,11 @@ export const delayPromise = (delayMS) =>
12
12
 
13
13
  /**
14
14
  * Async method call retry helper.
15
- * @param {Function} method - Async function to call.
15
+ * @template T
16
+ * @param {() => Promise<T>} method - Async function to call.
16
17
  * @param {number} numTries - Max retries.
17
18
  * @param {number} delayMs - Delay between attempts in ms.
18
- * @returns {Promise<any>} Async function result.
19
+ * @returns {Promise<T>} Async function result.
19
20
  */
20
21
  export const retryAsync = async (method, numTries = 1, delayMs = 100) => {
21
22
  for (let attempt = 0; attempt <= numTries; attempt += 1) {
@@ -1,4 +1,4 @@
1
1
  export function delayPromise(delayMS: number): Promise<void>;
2
- export function retryAsync(method: Function, numTries?: number, delayMs?: number): Promise<any>;
2
+ export function retryAsync<T>(method: () => Promise<T>, numTries?: number, delayMs?: number): Promise<T>;
3
3
  export function loadJSON(url: string): Promise<unknown>;
4
4
  //# sourceMappingURL=async.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../src/util/async.js"],"names":[],"mappings":"AAOO,sCAHI,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAKtB;AASG,wDAJI,MAAM,YACN,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CAkBxB;AAOM,8BAHI,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAQ5B"}
1
+ {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../src/util/async.js"],"names":[],"mappings":"AAOO,sCAHI,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAKtB;AAUG,2BANM,CAAC,UACH,MAAM,OAAO,CAAC,CAAC,CAAC,aAChB,MAAM,YACN,MAAM,GACJ,OAAO,CAAC,CAAC,CAAC,CAkBtB;AAOM,8BAHI,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAQ5B"}