@byloth/core 1.3.4 → 1.4.1
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/dist/core.js +105 -50
- package/dist/core.js.map +1 -1
- package/dist/core.umd.cjs +2 -2
- package/dist/core.umd.cjs.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +5 -2
- package/src/models/aggregators/aggregated-iterator.ts +34 -1
- package/src/models/aggregators/index.ts +7 -2
- package/src/models/aggregators/reduced-iterator.ts +37 -4
- package/src/models/aggregators/types.ts +3 -0
- package/src/models/exception.ts +2 -0
- package/src/models/index.ts +1 -0
- package/src/models/json-storage.ts +2 -0
- package/src/models/smart-iterator.ts +5 -1
- package/src/models/subscribers.ts +2 -0
- package/src/types.ts +3 -0
package/src/types.ts
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
export type Constructor<T extends object, P extends unknown[] = any[]> = new (...args: P) => T;
|
|
3
3
|
|
|
4
4
|
export type GeneratorFunction<T, R = void, N = undefined> = () => Generator<T, R, N>;
|
|
5
|
+
export type AsyncGeneratorFunction<T, R = void, N = undefined> = () => AsyncGenerator<T, R, N>;
|
|
5
6
|
export type Iteratee<T, R = void> = (value: T, index: number) => R;
|
|
7
|
+
export type TypeGuardIteratee<T, R extends T> = (value: T, index: number) => value is R;
|
|
8
|
+
|
|
6
9
|
export type Reducer<T, A> = (accumulator: A, value: T, index: number) => A;
|
|
7
10
|
|
|
8
11
|
export type MaybePromise<T> = T | PromiseLike<T>;
|