vovk 3.0.0-draft.237 → 3.0.0-draft.239
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/cjs/JSONLinesResponse.d.ts +1 -1
- package/cjs/JSONLinesResponse.js +1 -1
- package/cjs/utils/progressive.d.ts +3 -2
- package/cjs/utils/progressive.js +12 -0
- package/mjs/JSONLinesResponse.d.ts +1 -1
- package/mjs/JSONLinesResponse.js +1 -1
- package/mjs/utils/progressive.d.ts +3 -2
- package/mjs/utils/progressive.js +12 -0
- package/package.json +1 -1
package/cjs/JSONLinesResponse.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { VovkStreamAsyncIterable } from '../client/types';
|
|
2
|
-
import type { KnownAny } from '../types';
|
|
2
|
+
import type { KnownAny, VovkIteration } from '../types';
|
|
3
3
|
type UnionToIntersection<U> = (U extends KnownAny ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
4
4
|
type PromisifyProperties<T> = {
|
|
5
5
|
[K in keyof T]: Promise<T[K]>;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type TransformUnionToPromises<T> = PromisifyProperties<UnionToIntersection<T>>;
|
|
8
|
+
export declare function progressive<T extends (...args: KnownAny[]) => Promise<VovkStreamAsyncIterable<KnownAny>>>(fn: T, ...args: undefined extends Parameters<T>[0] ? [arg?: Parameters<T>[0]] : [arg: Parameters<T>[0]]): TransformUnionToPromises<VovkIteration<T>>;
|
|
8
9
|
export {};
|
package/cjs/utils/progressive.js
CHANGED
|
@@ -36,3 +36,15 @@ function progressive(fn, ...args) {
|
|
|
36
36
|
},
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
+
/*
|
|
40
|
+
type OriginalType = {
|
|
41
|
+
users: string[];
|
|
42
|
+
} | {
|
|
43
|
+
tasks: string[];
|
|
44
|
+
} | {
|
|
45
|
+
config: string;
|
|
46
|
+
} | {
|
|
47
|
+
metadata: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
type Result = UnionToIntersection<OriginalType>; */
|
package/mjs/JSONLinesResponse.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { VovkStreamAsyncIterable } from '../client/types';
|
|
2
|
-
import type { KnownAny } from '../types';
|
|
2
|
+
import type { KnownAny, VovkIteration } from '../types';
|
|
3
3
|
type UnionToIntersection<U> = (U extends KnownAny ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
4
4
|
type PromisifyProperties<T> = {
|
|
5
5
|
[K in keyof T]: Promise<T[K]>;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type TransformUnionToPromises<T> = PromisifyProperties<UnionToIntersection<T>>;
|
|
8
|
+
export declare function progressive<T extends (...args: KnownAny[]) => Promise<VovkStreamAsyncIterable<KnownAny>>>(fn: T, ...args: undefined extends Parameters<T>[0] ? [arg?: Parameters<T>[0]] : [arg: Parameters<T>[0]]): TransformUnionToPromises<VovkIteration<T>>;
|
|
8
9
|
export {};
|
package/mjs/utils/progressive.js
CHANGED
|
@@ -36,3 +36,15 @@ function progressive(fn, ...args) {
|
|
|
36
36
|
},
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
+
/*
|
|
40
|
+
type OriginalType = {
|
|
41
|
+
users: string[];
|
|
42
|
+
} | {
|
|
43
|
+
tasks: string[];
|
|
44
|
+
} | {
|
|
45
|
+
config: string;
|
|
46
|
+
} | {
|
|
47
|
+
metadata: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
type Result = UnionToIntersection<OriginalType>; */
|