wenay-common 1.0.148 → 1.0.149

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.
@@ -24,7 +24,7 @@ export declare function UseListen<T extends any[]>(): readonly [(...e: T) => voi
24
24
  removeListen: (a: tr222<T> | null) => void;
25
25
  count: () => number;
26
26
  }];
27
- export declare function PromiseArrayListen<T extends any = unknown>(array: ((() => Promise<T>) | Promise<T>)[]): {
27
+ export declare function PromiseArrayListen<T extends any = unknown>(array: ((() => Promise<T>) | (() => any) | Promise<T>)[]): {
28
28
  listenOk: (a: (data: T, i: number, countOk: number, countError: number, count: number) => any) => () => void;
29
29
  listenError: (a: (error: any, i: number, countOk: number, countError: number, count: number) => any) => () => void;
30
30
  promise: {
@@ -81,7 +81,7 @@ function PromiseArrayListen(array) {
81
81
  throw error;
82
82
  };
83
83
  const arr = array.map((e, i) => e instanceof Promise ? e.then(r => a(r, i)).catch((er) => b(er, i))
84
- : () => e().then(r => a(r, i)).catch((er) => b(er, i)));
84
+ : () => (async () => e())().then(r => a(r, i)).catch((er) => b(er, i)));
85
85
  return {
86
86
  listenOk: (a) => {
87
87
  t[1].addListen(a);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wenay-common",
3
- "version": "1.0.148",
3
+ "version": "1.0.149",
4
4
  "description": "Common library",
5
5
  "strict": true,
6
6
  "main": "lib/index.js",
package/lib/tsconfig.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonJS",
4
- "target": "esnext"
5
- }
6
- }