semantic-typescript 0.6.0 → 0.7.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.
- package/dist/asynchronous/collector.d.ts +62 -58
- package/dist/asynchronous/collector.js +16 -5
- package/dist/asynchronous/semantic.d.ts +2 -2
- package/dist/asynchronous/semantic.js +16 -6
- package/dist/factory.d.ts +8 -0
- package/dist/factory.js +112 -36
- package/dist/hook.d.ts +6 -1
- package/dist/hook.js +20 -3
- package/dist/main.d.ts +1 -0
- package/dist/main.js +6 -0
- package/dist/synchronous/collector.d.ts +8 -4
- package/dist/synchronous/collector.js +74 -59
- package/dist/synchronous/semantic.d.ts +27 -23
- package/dist/synchronous/semantic.js +215 -286
- package/package.json +3 -2
- package/readme.cn.md +213 -214
- package/readme.de.md +172 -173
- package/readme.es.md +177 -172
- package/readme.fr.md +181 -172
- package/readme.jp.md +187 -169
- package/readme.kr.md +182 -169
- package/readme.md +213 -214
- package/readme.ru.md +188 -169
- package/readme.tw.md +178 -169
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isFunction,
|
|
1
|
+
import { isFunction, isNumber, isBigInt, isBoolean, isString, isObject, isAsyncFunction, isIterable } from "../guard";
|
|
2
2
|
import { useCompare, useToBigInt, useToNumber } from "../hook";
|
|
3
3
|
import { Optional } from "../optional";
|
|
4
4
|
import { SynchronousCollectorSymbol } from "../symbol";
|
|
5
|
-
import {
|
|
5
|
+
import { invalidate, validate } from "../utility";
|
|
6
6
|
export class SynchronousCollector {
|
|
7
7
|
identity;
|
|
8
8
|
interrupt;
|
|
@@ -54,7 +54,7 @@ export class SynchronousCollector {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
collect(argument1, argument2) {
|
|
57
|
-
if (isFunction(argument1)) {
|
|
57
|
+
if (isAsyncFunction(argument1) || isFunction(argument1)) {
|
|
58
58
|
try {
|
|
59
59
|
let generator = argument1;
|
|
60
60
|
let accumulator = this.identity();
|
|
@@ -66,29 +66,25 @@ export class SynchronousCollector {
|
|
|
66
66
|
return this.finisher(accumulator);
|
|
67
67
|
}
|
|
68
68
|
catch (error) {
|
|
69
|
-
|
|
70
|
-
throw new Error("Uncaught error on collect.");
|
|
69
|
+
throw error;
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
else if (isIterable(argument1)) {
|
|
74
73
|
try {
|
|
75
74
|
let iterable = argument1;
|
|
76
|
-
let index = 0n;
|
|
77
75
|
let accumulator = this.identity();
|
|
78
76
|
let count = 0n;
|
|
79
77
|
for (let element of iterable) {
|
|
80
|
-
if (this.interrupt(element,
|
|
78
|
+
if (this.interrupt(element, count, accumulator)) {
|
|
81
79
|
break;
|
|
82
80
|
}
|
|
83
81
|
accumulator = this.accumulator(accumulator, element, count);
|
|
84
82
|
count++;
|
|
85
|
-
index++;
|
|
86
83
|
}
|
|
87
84
|
return this.finisher(accumulator);
|
|
88
85
|
}
|
|
89
86
|
catch (error) {
|
|
90
|
-
|
|
91
|
-
throw new Error("Uncaught error n collect.");
|
|
87
|
+
throw error;
|
|
92
88
|
}
|
|
93
89
|
}
|
|
94
90
|
else if (isNumber(argument1) && isNumber(argument2)) {
|
|
@@ -107,8 +103,7 @@ export class SynchronousCollector {
|
|
|
107
103
|
return this.finisher(accumulator);
|
|
108
104
|
}
|
|
109
105
|
catch (error) {
|
|
110
|
-
|
|
111
|
-
throw new Error("Uncaught error on collect.");
|
|
106
|
+
throw error;
|
|
112
107
|
}
|
|
113
108
|
}
|
|
114
109
|
else if (isBigInt(argument1) && isBigInt(argument2)) {
|
|
@@ -127,12 +122,23 @@ export class SynchronousCollector {
|
|
|
127
122
|
return this.finisher(accumulator);
|
|
128
123
|
}
|
|
129
124
|
catch (error) {
|
|
130
|
-
|
|
131
|
-
throw new Error("Uncaught error on collect.");
|
|
125
|
+
throw error;
|
|
132
126
|
}
|
|
133
127
|
}
|
|
134
128
|
throw new Error("Invalid arguments.");
|
|
135
129
|
}
|
|
130
|
+
getIdentity() {
|
|
131
|
+
return this.identity;
|
|
132
|
+
}
|
|
133
|
+
getInterrupt() {
|
|
134
|
+
return this.interrupt;
|
|
135
|
+
}
|
|
136
|
+
getAccumulator() {
|
|
137
|
+
return this.accumulator;
|
|
138
|
+
}
|
|
139
|
+
getFinisher() {
|
|
140
|
+
return this.finisher;
|
|
141
|
+
}
|
|
136
142
|
static full(identity, accumulator, finisher) {
|
|
137
143
|
return new SynchronousCollector(identity, () => false, accumulator, finisher);
|
|
138
144
|
}
|
|
@@ -173,7 +179,7 @@ export let useSynchronousCollect = (argument1, argument2, argument3, argument4)
|
|
|
173
179
|
throw new TypeError("Identity, accumulator, and finisher must be functions.");
|
|
174
180
|
};
|
|
175
181
|
export let useSynchronousCount = () => {
|
|
176
|
-
return SynchronousCollector.full(() => 0n, (count) => count + 1n, (count) => count);
|
|
182
|
+
return SynchronousCollector.full(() => 0n, (count) => isBigInt(count) ? (count + 1n) : 1n, (count) => isBigInt(count) ? count : 0n);
|
|
177
183
|
};
|
|
178
184
|
;
|
|
179
185
|
export let useSynchronousError = (argument1, argument2, argument3) => {
|
|
@@ -215,65 +221,78 @@ export let useSynchronousFindAt = (index) => {
|
|
|
215
221
|
let target = useToBigInt(index);
|
|
216
222
|
if (target < 0n) {
|
|
217
223
|
return SynchronousCollector.full(() => [], (accumulator, element) => {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
224
|
+
let accumulated = Array.isArray(accumulator) ? accumulator : [];
|
|
225
|
+
accumulated.push(element);
|
|
226
|
+
return accumulated;
|
|
227
|
+
}, (result) => {
|
|
228
|
+
if (Array.isArray(result) && result.length > 0) {
|
|
229
|
+
let index = ((Number(target) % result.length) + result.length) % result.length;
|
|
230
|
+
return Optional.of(result[index]);
|
|
223
231
|
}
|
|
224
|
-
|
|
225
|
-
return Optional.ofNullable(accumulator[Number(limited)]);
|
|
232
|
+
return Optional.empty();
|
|
226
233
|
});
|
|
227
234
|
}
|
|
228
235
|
return SynchronousCollector.shortable(() => [], (_element, _index, accumulator) => BigInt(accumulator.length) - 1n === target, (accumulator, element) => {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
236
|
+
let accumulated = Array.isArray(accumulator) ? accumulator : [];
|
|
237
|
+
accumulated.push(element);
|
|
238
|
+
return accumulated;
|
|
239
|
+
}, (result) => {
|
|
240
|
+
let index = ((Number(target) % result.length) + result.length) % result.length;
|
|
241
|
+
if (Array.isArray(result) && result.length > 0) {
|
|
242
|
+
return Optional.of(result[index]);
|
|
234
243
|
}
|
|
235
|
-
return Optional.
|
|
244
|
+
return Optional.empty();
|
|
236
245
|
});
|
|
237
246
|
};
|
|
238
247
|
export let useSynchronousFindFirst = () => {
|
|
239
248
|
return SynchronousCollector.shortable(() => Optional.empty(), (_element, _index, accumulator) => validate(accumulator) && accumulator.isPresent(), (accumulator, element) => {
|
|
240
|
-
if (validate(accumulator) && accumulator.isPresent()) {
|
|
241
|
-
return
|
|
249
|
+
if (validate(accumulator) && accumulator.isPresent() && validate(element)) {
|
|
250
|
+
return Optional.of(element);
|
|
242
251
|
}
|
|
243
|
-
return
|
|
244
|
-
}, (
|
|
252
|
+
return accumulator;
|
|
253
|
+
}, (result) => result);
|
|
245
254
|
};
|
|
246
255
|
export let useSynchronousFindAny = () => {
|
|
247
256
|
return SynchronousCollector.shortable(() => Optional.empty(), (_element, _index, accumulator) => validate(accumulator) && accumulator.isPresent(), (accumulator, element) => {
|
|
248
|
-
if (validate(accumulator) && accumulator.isPresent() && Math.random() < 0.5) {
|
|
249
|
-
return
|
|
257
|
+
if (validate(accumulator) && accumulator.isPresent() && validate(element) && Math.random() < 0.5) {
|
|
258
|
+
return Optional.of(element);
|
|
250
259
|
}
|
|
251
|
-
return
|
|
252
|
-
}, (
|
|
260
|
+
return accumulator;
|
|
261
|
+
}, (result) => result);
|
|
253
262
|
};
|
|
254
263
|
export let useSynchronousFindLast = () => {
|
|
255
264
|
return SynchronousCollector.full(() => Optional.empty(), (accumulator, element) => {
|
|
256
|
-
if (validate(accumulator) && accumulator.isPresent()) {
|
|
257
|
-
return Optional.
|
|
265
|
+
if (validate(accumulator) && accumulator.isPresent() && validate(element)) {
|
|
266
|
+
return Optional.of(element);
|
|
258
267
|
}
|
|
259
268
|
return accumulator;
|
|
260
|
-
}, (
|
|
269
|
+
}, (result) => result);
|
|
261
270
|
};
|
|
262
271
|
export let useSynchronousFindMaximum = (comparator = (useCompare)) => {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
272
|
+
if (isFunction(comparator)) {
|
|
273
|
+
return SynchronousCollector.full(() => Optional.empty(), (accumulator, element) => {
|
|
274
|
+
if (validate(accumulator) && accumulator.isPresent()) {
|
|
275
|
+
return accumulator.map((previous) => {
|
|
276
|
+
return comparator(previous, element) > 0 ? previous : element;
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
return accumulator;
|
|
280
|
+
}, (result) => result);
|
|
281
|
+
}
|
|
282
|
+
throw new TypeError("Invalid argument.");
|
|
269
283
|
};
|
|
270
284
|
export let useSynchronousFindMinimum = (comparator = (useCompare)) => {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
285
|
+
if (isFunction(comparator)) {
|
|
286
|
+
return SynchronousCollector.full(() => Optional.empty(), (accumulator, element) => {
|
|
287
|
+
if (validate(accumulator) && accumulator.isPresent()) {
|
|
288
|
+
return accumulator.map((previous) => {
|
|
289
|
+
return comparator(previous, element) < 0 ? previous : element;
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
return accumulator;
|
|
293
|
+
}, (result) => result);
|
|
294
|
+
}
|
|
295
|
+
throw new TypeError("Invalid argument.");
|
|
277
296
|
};
|
|
278
297
|
;
|
|
279
298
|
export let useSynchronousForEach = (action) => {
|
|
@@ -364,7 +383,6 @@ export let useSynchronousLog = (argument1, argument2, argument3) => {
|
|
|
364
383
|
}
|
|
365
384
|
else {
|
|
366
385
|
return SynchronousCollector.full(() => "[", (accumulator, element) => {
|
|
367
|
-
console.log(element);
|
|
368
386
|
if (isString(accumulator) && isString(element)) {
|
|
369
387
|
return accumulator + element + ",";
|
|
370
388
|
}
|
|
@@ -416,14 +434,11 @@ export let useSynchronousPartitionBy = (classifier) => {
|
|
|
416
434
|
export let useSynchronousReduce = (argument1, argument2, argument3) => {
|
|
417
435
|
if (isFunction(argument1) && invalidate(argument2) && invalidate(argument3)) {
|
|
418
436
|
let accumulator = argument1;
|
|
419
|
-
return SynchronousCollector.full(() => Optional.
|
|
420
|
-
if (result.
|
|
421
|
-
return
|
|
422
|
-
}
|
|
423
|
-
else {
|
|
424
|
-
let current = result.get();
|
|
425
|
-
return Optional.of(accumulator(current, element, index));
|
|
437
|
+
return SynchronousCollector.full(() => Optional.empty(), (result, element, index) => {
|
|
438
|
+
if (validate(result) && result.isPresent()) {
|
|
439
|
+
return result.map((previous) => accumulator(previous, element, index));
|
|
426
440
|
}
|
|
441
|
+
return result;
|
|
427
442
|
}, (result) => result);
|
|
428
443
|
}
|
|
429
444
|
else if (validate(argument1) && isFunction(argument2) && invalidate(argument3)) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type BiConsumer, type BiFunctional, type BiPredicate, type Comparator, type Consumer, type Functional, type Indexed, type Predicate, type Supplier, type SynchronousGenerator, type TriFunctional, type TriPredicate } from "../utility";
|
|
1
2
|
import { SynchronousCollector } from "./collector";
|
|
2
3
|
import type { Optional } from "../optional";
|
|
3
|
-
import type { BiConsumer, BiFunctional, BiPredicate, Comparator, Consumer, Functional, Indexed, Predicate, Supplier, SynchronousGenerator, TriFunctional, TriPredicate } from "../utility";
|
|
4
4
|
export declare class SynchronousSemantic<E> {
|
|
5
5
|
protected generator: SynchronousGenerator<E>;
|
|
6
6
|
protected readonly SynchronousSemantic: Symbol;
|
|
7
|
+
[Symbol.toStringTag]: string;
|
|
7
8
|
constructor(generator: SynchronousGenerator<E>);
|
|
8
9
|
concat(other: SynchronousSemantic<E>): SynchronousSemantic<E>;
|
|
9
10
|
concat(other: Iterable<E>): SynchronousSemantic<E>;
|
|
@@ -22,8 +23,8 @@ export declare class SynchronousSemantic<E> {
|
|
|
22
23
|
flatMap<R>(mapper: BiFunctional<E, bigint, Iterable<R>>): SynchronousSemantic<R>;
|
|
23
24
|
flatMap<R>(mapper: Functional<E, SynchronousSemantic<R>>): SynchronousSemantic<R>;
|
|
24
25
|
flatMap<R>(mapper: BiFunctional<E, bigint, SynchronousSemantic<R>>): SynchronousSemantic<R>;
|
|
25
|
-
limit(
|
|
26
|
-
limit(
|
|
26
|
+
limit(count: number): SynchronousSemantic<E>;
|
|
27
|
+
limit(count: bigint): SynchronousSemantic<E>;
|
|
27
28
|
map<R>(mapper: Functional<E, R>): SynchronousSemantic<R>;
|
|
28
29
|
map<R>(mapper: BiFunctional<E, bigint, R>): SynchronousSemantic<R>;
|
|
29
30
|
peek(consumer: Consumer<E>): SynchronousSemantic<E>;
|
|
@@ -32,16 +33,15 @@ export declare class SynchronousSemantic<E> {
|
|
|
32
33
|
reverse(): SynchronousSemantic<E>;
|
|
33
34
|
shuffle(): SynchronousSemantic<E>;
|
|
34
35
|
shuffle(mapper: BiFunctional<E, bigint, bigint>): SynchronousSemantic<E>;
|
|
35
|
-
skip(
|
|
36
|
-
skip(
|
|
36
|
+
skip(count: number): SynchronousSemantic<E>;
|
|
37
|
+
skip(count: bigint): SynchronousSemantic<E>;
|
|
37
38
|
source(): SynchronousGenerator<E>;
|
|
38
|
-
|
|
39
|
-
sorted(comparator: Comparator<E>): SynchronousOrderedCollectable<E>;
|
|
39
|
+
sub(start: number, end: number): SynchronousSemantic<E>;
|
|
40
40
|
sub(start: bigint, end: bigint): SynchronousSemantic<E>;
|
|
41
41
|
takeWhile(predicate: Predicate<E>): SynchronousSemantic<E>;
|
|
42
42
|
takeWhile(predicate: BiPredicate<E, bigint>): SynchronousSemantic<E>;
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
toCollectable(): SynchronousCollectable<E>;
|
|
44
|
+
toCollectable<C extends SynchronousCollectable<E>>(mapper: Functional<SynchronousGenerator<E>, C>): C;
|
|
45
45
|
toBigintStatistics(): SynchronousBigIntStatistics<E>;
|
|
46
46
|
toNumericStatistics(): SynchronousNumericStatistics<E>;
|
|
47
47
|
toOrdered(): SynchronousOrderedCollectable<E>;
|
|
@@ -51,13 +51,15 @@ export declare class SynchronousSemantic<E> {
|
|
|
51
51
|
translate(offset: bigint): SynchronousSemantic<E>;
|
|
52
52
|
translate(translator: BiFunctional<E, bigint, bigint>): SynchronousSemantic<E>;
|
|
53
53
|
}
|
|
54
|
-
export declare abstract class SynchronousCollectable<E> {
|
|
54
|
+
export declare abstract class SynchronousCollectable<E> implements Iterable<E> {
|
|
55
55
|
protected readonly SynchronousCollectable: symbol;
|
|
56
|
+
[Symbol.toStringTag]: string;
|
|
56
57
|
constructor();
|
|
57
|
-
|
|
58
|
-
abstract [Symbol.asyncIterator](): globalThis.AsyncGenerator<E, void, undefined>;
|
|
58
|
+
[Symbol.iterator](): globalThis.Generator<E, void, undefined>;
|
|
59
59
|
anyMatch(predicate: Predicate<E>): boolean;
|
|
60
|
+
anyMatch(predicate: BiPredicate<E, bigint>): boolean;
|
|
60
61
|
allMatch(predicate: Predicate<E>): boolean;
|
|
62
|
+
allMatch(predicate: BiPredicate<E, bigint>): boolean;
|
|
61
63
|
collect<A, R>(collector: SynchronousCollector<E, A, R>): R;
|
|
62
64
|
collect<A, R>(identity: Supplier<A>, accumulator: BiFunctional<A, E, A>, finisher: Functional<A, R>): R;
|
|
63
65
|
collect<A, R>(identity: Supplier<A>, accumulator: TriFunctional<A, E, bigint, A>, finisher: Functional<A, R>): R;
|
|
@@ -104,8 +106,8 @@ export declare abstract class SynchronousCollectable<E> {
|
|
|
104
106
|
partition(count: bigint): Array<Array<E>>;
|
|
105
107
|
partitionBy(classifier: Functional<E, bigint>): Array<Array<E>>;
|
|
106
108
|
partitionBy(classifier: BiFunctional<E, bigint, bigint>): Array<Array<E>>;
|
|
107
|
-
reduce(accumulator: BiFunctional<E, E, E>):
|
|
108
|
-
reduce(accumulator: TriFunctional<E, E, bigint, E>):
|
|
109
|
+
reduce(accumulator: BiFunctional<E, E, E>): E;
|
|
110
|
+
reduce(accumulator: TriFunctional<E, E, bigint, E>): E;
|
|
109
111
|
reduce(identity: E, accumulator: BiFunctional<E, E, E>): E;
|
|
110
112
|
reduce(identity: E, accumulator: TriFunctional<E, E, bigint, E>): E;
|
|
111
113
|
reduce<R>(identity: R, accumulator: BiFunctional<R, E, R>, finisher: Functional<R, R>): R;
|
|
@@ -122,30 +124,32 @@ export declare abstract class SynchronousCollectable<E> {
|
|
|
122
124
|
write<S = string>(stream: WritableStream<S>, accumulator: TriFunctional<WritableStream<S>, E, bigint, WritableStream<S>>): Promise<WritableStream<S>>;
|
|
123
125
|
}
|
|
124
126
|
export declare class SynchronousOrderedCollectable<E> extends SynchronousCollectable<E> {
|
|
125
|
-
protected readonly
|
|
127
|
+
protected readonly OrderedCollectable: symbol;
|
|
126
128
|
protected buffer: Array<Indexed<E>>;
|
|
129
|
+
[Symbol.toStringTag]: string;
|
|
127
130
|
constructor(generator: SynchronousGenerator<E>);
|
|
128
131
|
constructor(generator: SynchronousGenerator<E>, comparator: Comparator<E>);
|
|
129
132
|
[Symbol.iterator](): globalThis.Generator<E, void, undefined>;
|
|
130
|
-
|
|
133
|
+
allMatch(predicate: Predicate<E>): boolean;
|
|
134
|
+
allMatch(predicate: BiPredicate<E, bigint>): boolean;
|
|
131
135
|
source(): SynchronousGenerator<E>;
|
|
132
136
|
isEmpty(): boolean;
|
|
137
|
+
count(): bigint;
|
|
133
138
|
}
|
|
134
139
|
export declare class SynchronousUnorderedCollectable<E> extends SynchronousCollectable<E> {
|
|
135
140
|
protected readonly SynchronousUnorderedCollectable: symbol;
|
|
141
|
+
[Symbol.toStringTag]: string;
|
|
136
142
|
protected buffer: Map<bigint, E>;
|
|
137
143
|
constructor(generator: SynchronousGenerator<E>);
|
|
138
|
-
source(): SynchronousGenerator<E>;
|
|
139
144
|
[Symbol.iterator](): globalThis.Generator<E, void, undefined>;
|
|
140
|
-
|
|
145
|
+
source(): SynchronousGenerator<E>;
|
|
141
146
|
}
|
|
142
147
|
export declare abstract class SynchronousStatistics<E, D extends number | bigint> extends SynchronousOrderedCollectable<E> {
|
|
143
148
|
protected readonly SynchronousStatistics: symbol;
|
|
149
|
+
[Symbol.toStringTag]: string;
|
|
144
150
|
constructor(generator: SynchronousGenerator<E>);
|
|
145
151
|
constructor(generator: SynchronousGenerator<E>, comparator: Comparator<E>);
|
|
146
152
|
[Symbol.iterator](): globalThis.Generator<E, void, undefined>;
|
|
147
|
-
[Symbol.asyncIterator](): globalThis.AsyncGenerator<E, void, undefined>;
|
|
148
|
-
count(): bigint;
|
|
149
153
|
abstract average(): D;
|
|
150
154
|
abstract average(mapper: Functional<E, D>): D;
|
|
151
155
|
abstract range(): D;
|
|
@@ -174,10 +178,10 @@ export declare abstract class SynchronousStatistics<E, D extends number | bigint
|
|
|
174
178
|
}
|
|
175
179
|
export declare class SynchronousBigIntStatistics<E> extends SynchronousStatistics<E, bigint> {
|
|
176
180
|
protected readonly BigIntStatistics: symbol;
|
|
181
|
+
[Symbol.toStringTag]: string;
|
|
177
182
|
constructor(generator: SynchronousGenerator<E>);
|
|
178
183
|
constructor(generator: SynchronousGenerator<E>, comparator: Comparator<E>);
|
|
179
184
|
[Symbol.iterator](): globalThis.Generator<E, void, undefined>;
|
|
180
|
-
[Symbol.asyncIterator](): globalThis.AsyncGenerator<E, void, undefined>;
|
|
181
185
|
average(): bigint;
|
|
182
186
|
average(mapper: Functional<E, bigint>): bigint;
|
|
183
187
|
range(): bigint;
|
|
@@ -205,10 +209,10 @@ export declare class SynchronousBigIntStatistics<E> extends SynchronousStatistic
|
|
|
205
209
|
}
|
|
206
210
|
export declare class SynchronousNumericStatistics<E> extends SynchronousStatistics<E, number> {
|
|
207
211
|
protected readonly SynchronousNumericStatistics: symbol;
|
|
212
|
+
[Symbol.toStringTag]: string;
|
|
208
213
|
constructor(generator: SynchronousGenerator<E>);
|
|
209
214
|
constructor(generator: SynchronousGenerator<E>, comparator: Comparator<E>);
|
|
210
215
|
[Symbol.iterator](): globalThis.Generator<E, void, undefined>;
|
|
211
|
-
[Symbol.asyncIterator](): globalThis.AsyncGenerator<E, void, undefined>;
|
|
212
216
|
average(): number;
|
|
213
217
|
average(mapper: Functional<E, number>): number;
|
|
214
218
|
range(): number;
|
|
@@ -236,10 +240,10 @@ export declare class SynchronousNumericStatistics<E> extends SynchronousStatisti
|
|
|
236
240
|
}
|
|
237
241
|
export declare class SynchronousWindowCollectable<E> extends SynchronousOrderedCollectable<E> {
|
|
238
242
|
protected readonly WindowCollectable: symbol;
|
|
243
|
+
[Symbol.toStringTag]: string;
|
|
239
244
|
constructor(generator: SynchronousGenerator<E>);
|
|
240
245
|
constructor(generator: SynchronousGenerator<E>, comparator: Comparator<E>);
|
|
241
246
|
[Symbol.iterator](): globalThis.Generator<E, void, undefined>;
|
|
242
|
-
[Symbol.asyncIterator](): globalThis.AsyncGenerator<E, void, undefined>;
|
|
243
247
|
slide(size: bigint, step?: bigint): SynchronousSemantic<SynchronousSemantic<E>>;
|
|
244
248
|
tumble(size: bigint): SynchronousSemantic<SynchronousSemantic<E>>;
|
|
245
249
|
}
|