@byloth/core 1.5.0-rc.8 → 1.5.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.
@@ -3,7 +3,7 @@ import type {
3
3
  GeneratorFunction,
4
4
  MaybeAsyncIteratee,
5
5
  MaybeAsyncReducer,
6
- MaybeAsyncIterables,
6
+ MaybeAsyncIterLike,
7
7
  MaybeAsyncTypeGuardIteratee
8
8
 
9
9
  } from "./types.js";
@@ -21,8 +21,8 @@ export default class SmartAsyncIterator<T, R = void, N = undefined> implements A
21
21
  public constructor(iterator: AsyncIterator<T, R, N>);
22
22
  public constructor(generatorFn: GeneratorFunction<T, R, N>);
23
23
  public constructor(generatorFn: AsyncGeneratorFunction<T, R, N>);
24
- public constructor(argument: MaybeAsyncIterables<T, R, N>);
25
- public constructor(argument: MaybeAsyncIterables<T, R, N>)
24
+ public constructor(argument: MaybeAsyncIterLike<T, R, N>);
25
+ public constructor(argument: MaybeAsyncIterLike<T, R, N>)
26
26
  {
27
27
  if (argument instanceof Function)
28
28
  {
@@ -1,4 +1,4 @@
1
- import type { GeneratorFunction, Iteratee, TypeGuardIteratee, Reducer, Iterables } from "./types.js";
1
+ import type { GeneratorFunction, Iteratee, TypeGuardIteratee, Reducer, IterLike } from "./types.js";
2
2
 
3
3
  export default class SmartIterator<T, R = void, N = undefined> implements Iterator<T, R, N>
4
4
  {
@@ -10,8 +10,8 @@ export default class SmartIterator<T, R = void, N = undefined> implements Iterat
10
10
  public constructor(iterable: Iterable<T>);
11
11
  public constructor(iterator: Iterator<T, R, N>);
12
12
  public constructor(generatorFn: GeneratorFunction<T, R, N>);
13
- public constructor(argument: Iterables<T, R, N>);
14
- public constructor(argument: Iterables<T, R, N>)
13
+ public constructor(argument: IterLike<T, R, N>);
14
+ public constructor(argument: IterLike<T, R, N>)
15
15
  {
16
16
  if (argument instanceof Function)
17
17
  {
@@ -13,8 +13,8 @@ export type MaybeAsyncTypeGuardIteratee<T, R extends T> = (value: MaybePromise<T
13
13
  export type Reducer<T, A> = (accumulator: A, value: T, index: number) => A;
14
14
  export type MaybeAsyncReducer<T, A> = (accumulator: A, value: T, index: number) => MaybePromise<A>;
15
15
 
16
- export type Iterables<T, R = void, N = undefined> = Iterable<T> | Iterator<T, R, N> | GeneratorFunction<T, R, N>;
17
- export type AsyncIterables<T, R = void, N = undefined> =
16
+ export type IterLike<T, R = void, N = undefined> = Iterable<T> | Iterator<T, R, N> | GeneratorFunction<T, R, N>;
17
+ export type AsyncIterLike<T, R = void, N = undefined> =
18
18
  AsyncIterable<T> | AsyncIterator<T, R, N> | AsyncGeneratorFunction<T, R, N>;
19
19
 
20
- export type MaybeAsyncIterables<T, R = void, N = undefined> = Iterables<T, R, N> | AsyncIterables<T, R, N>;
20
+ export type MaybeAsyncIterLike<T, R = void, N = undefined> = IterLike<T, R, N> | AsyncIterLike<T, R, N>;
@@ -1,4 +1,13 @@
1
- export type { KeyIteratee, KeyReducer, KeyTypeGuardIteratee } from "./aggregators/types.js";
1
+ export type {
2
+ KeyIteratee,
3
+ MaybeAsyncKeyIteratee,
4
+ KeyTypeGuardIteratee,
5
+ MaybeAsyncKeyTypeGuardIteratee,
6
+ KeyReducer,
7
+ MaybeAsyncKeyReducer
8
+
9
+ } from "./aggregators/types.js";
10
+
2
11
  export type {
3
12
  GeneratorFunction,
4
13
  AsyncGeneratorFunction,
@@ -7,7 +16,10 @@ export type {
7
16
  TypeGuardIteratee,
8
17
  MaybeAsyncTypeGuardIteratee,
9
18
  Reducer,
10
- MaybeAsyncReducer
19
+ MaybeAsyncReducer,
20
+ IterLike,
21
+ AsyncIterLike,
22
+ MaybeAsyncIterLike
11
23
 
12
24
  } from "./iterators/types.js";
13
25
 
@@ -3,7 +3,7 @@ import Random from "./random.js";
3
3
  export { delay, nextAnimationFrame } from "./async.js";
4
4
  export { dateDifference, dateRange, dateRound, DateUnit } from "./date.js";
5
5
  export { loadScript } from "./dom.js";
6
- export { count, range, shuffle, unique, zip } from "./iterator.js";
6
+ export { chain, count, enumerate, range, shuffle, unique, zip } from "./iterator.js";
7
7
  export { average, hash, sum } from "./math.js";
8
8
  export { capitalize } from "./string.js";
9
9