mixlea-utils-js 0.1.34 → 0.1.35

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.
@@ -474,6 +474,8 @@ export declare function execFunc(func: Function): any;
474
474
 
475
475
  export declare function executePromises<T extends any[]>(promises: [...Array<Promise<T[number]>>]): Promise<T>;
476
476
 
477
+ export declare function execWebWorker<T extends any[], R>(fn: (...args: T) => R | Promise<R>, ...args: T): Promise<R>;
478
+
477
479
  declare function exportFile({ fileName, fallbackFileName, file, }: {
478
480
  file: File;
479
481
  fileName?: string;
@@ -1463,6 +1465,22 @@ export declare function when<V>(condition: ValueOrFn_2<boolean>, result: ValueOr
1463
1465
  */
1464
1466
  export declare function wordCount(str: string, word: string): number;
1465
1467
 
1468
+ declare class WorkerPool {
1469
+ private worker;
1470
+ constructor();
1471
+ exec<T extends any[], R>(fn: (...args: T) => R | Promise<R>, ...args: T): Promise<R>;
1472
+ terminate(): void;
1473
+ }
1474
+
1475
+ export declare const workerPool: WorkerPool;
1476
+
1466
1477
  export declare function zipArrayObject(param: Record<string, any[]>): any[];
1467
1478
 
1468
1479
  export { }
1480
+
1481
+
1482
+ declare global {
1483
+ interface Window {
1484
+ __MIXLEA_UTILS_JS_WORKER_POOL__: WorkerPool | undefined;
1485
+ }
1486
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mixlea-utils-js",
3
3
  "type": "module",
4
- "version": "0.1.34",
4
+ "version": "0.1.35",
5
5
  "private": false,
6
6
  "license": "Apache-2.0",
7
7
  "exports": {