tyneq 1.0.0 → 1.0.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.
Files changed (62) hide show
  1. package/README.md +67 -1
  2. package/dist/{TyneqCachedTerminalOperator.d.ts → TyneqCachedTerminalOperator-DTVuBGMn.d.ts} +150 -173
  3. package/dist/{TyneqCachedTerminalOperator.d.cts → TyneqCachedTerminalOperator-QzqAHJSE.d.cts} +150 -173
  4. package/dist/chunk-6QXGRDRO.cjs +681 -0
  5. package/dist/chunk-6QXGRDRO.cjs.map +1 -0
  6. package/dist/chunk-BKSTSJTW.js +3786 -0
  7. package/dist/chunk-BKSTSJTW.js.map +1 -0
  8. package/dist/chunk-D2KVCXTF.cjs +47 -0
  9. package/dist/chunk-D2KVCXTF.cjs.map +1 -0
  10. package/dist/chunk-DVHUFMNJ.js +47 -0
  11. package/dist/chunk-DVHUFMNJ.js.map +1 -0
  12. package/dist/chunk-KT2G2VJZ.js +681 -0
  13. package/dist/chunk-KT2G2VJZ.js.map +1 -0
  14. package/dist/chunk-TOFO2EMH.cjs +3786 -0
  15. package/dist/chunk-TOFO2EMH.cjs.map +1 -0
  16. package/dist/core-DR17XN89.d.cts +1390 -0
  17. package/dist/core-DR17XN89.d.ts +1390 -0
  18. package/dist/index.cjs +637 -841
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +554 -576
  21. package/dist/index.d.ts +554 -576
  22. package/dist/index.js +630 -780
  23. package/dist/index.js.map +1 -1
  24. package/dist/plugin/index.cjs +50 -24
  25. package/dist/plugin/index.cjs.map +1 -0
  26. package/dist/plugin/index.d.cts +35 -38
  27. package/dist/plugin/index.d.ts +35 -38
  28. package/dist/plugin/index.js +50 -2
  29. package/dist/plugin/index.js.map +1 -0
  30. package/dist/utility/index.cjs +19 -9
  31. package/dist/utility/index.cjs.map +1 -0
  32. package/dist/utility/index.d.cts +312 -2
  33. package/dist/utility/index.d.ts +312 -2
  34. package/dist/utility/index.js +19 -3
  35. package/dist/utility/index.js.map +1 -0
  36. package/package.json +5 -5
  37. package/dist/Lazy.cjs +0 -762
  38. package/dist/Lazy.cjs.map +0 -1
  39. package/dist/Lazy.js +0 -691
  40. package/dist/Lazy.js.map +0 -1
  41. package/dist/TyneqCachedTerminalOperator.cjs +0 -4950
  42. package/dist/TyneqCachedTerminalOperator.cjs.map +0 -1
  43. package/dist/TyneqCachedTerminalOperator.d.cts.map +0 -1
  44. package/dist/TyneqCachedTerminalOperator.d.ts.map +0 -1
  45. package/dist/TyneqCachedTerminalOperator.js +0 -4741
  46. package/dist/TyneqCachedTerminalOperator.js.map +0 -1
  47. package/dist/ValidationBuilder.cjs +0 -80
  48. package/dist/ValidationBuilder.cjs.map +0 -1
  49. package/dist/ValidationBuilder.d.cts +0 -319
  50. package/dist/ValidationBuilder.d.cts.map +0 -1
  51. package/dist/ValidationBuilder.d.ts +0 -319
  52. package/dist/ValidationBuilder.d.ts.map +0 -1
  53. package/dist/ValidationBuilder.js +0 -69
  54. package/dist/ValidationBuilder.js.map +0 -1
  55. package/dist/core.d.cts +0 -1393
  56. package/dist/core.d.cts.map +0 -1
  57. package/dist/core.d.ts +0 -1393
  58. package/dist/core.d.ts.map +0 -1
  59. package/dist/index.d.cts.map +0 -1
  60. package/dist/index.d.ts.map +0 -1
  61. package/dist/plugin/index.d.cts.map +0 -1
  62. package/dist/plugin/index.d.ts.map +0 -1
package/README.md CHANGED
@@ -169,7 +169,73 @@ Two registration styles: functional (generators, factories, terminals) and class
169
169
  npm install tyneq
170
170
  ```
171
171
 
172
- TypeScript 5.x with `"strictNullChecks": true`. No `@types` package needed.
172
+ ## Requirements
173
+
174
+ - TypeScript 5.0 or higher
175
+ - `"strictNullChecks": true` in your tsconfig
176
+
177
+ No `@types` package needed.
178
+
179
+ ## Stage 3 Decorators
180
+
181
+ tyneq is implemented with TC39 Stage 3 decorators - the standardized decorator proposal
182
+ that shipped in TypeScript 5.0 and requires no extra tsconfig flags. This is a different
183
+ model from the legacy `experimentalDecorators` syntax used by NestJS, Angular, and
184
+ InversifyJS.
185
+
186
+ **Using built-in operators requires nothing from you.** The decorator machinery lives
187
+ entirely inside tyneq's compiled output. Calling `.where()`, `.select()`, or any terminal
188
+ is just calling a plain method. No decorator support is needed on your side at all.
189
+
190
+ **Using the class-based plugin API does require Stage 3 decorators in your project.**
191
+ If you write custom operators using `@operator`, `@terminal`, `@orderedOperator`, or
192
+ `@cachedOperator`, your tsconfig must not have `experimentalDecorators: true`, because
193
+ TypeScript supports only one decorator model at a time. If your project already uses
194
+ the legacy model, the functional plugin API is fully equivalent and has no such constraint.
195
+
196
+ ### How the dist handles decorators
197
+
198
+ The published `dist` is compiled by tsup (esbuild) targeting `es2017`. esbuild
199
+ transforms Stage 3 decorator syntax into plain helper functions (`__decorateClass`,
200
+ `__decorateElement`) at build time, so the output works in every Node version, bundler,
201
+ and consumer project - including those with no native decorator support at all.
202
+
203
+ | Aspect | Detail |
204
+ |---|---|
205
+ | Raw `@decorator` syntax in dist | No - compiled to helper functions |
206
+ | Node 18+ | Works |
207
+ | Projects with `experimentalDecorators: true` | Works (built-ins and functional plugin API) |
208
+ | Extra bundle overhead | Small - one shared set of helpers per entry point |
209
+
210
+ **Trade-offs to be aware of:**
211
+
212
+ - Helper-function output is slightly larger than native decorator syntax would be. The
213
+ helpers are small and shared across all operators within an entry point, so in practice
214
+ the impact is minimal.
215
+ - Tools that understand Stage 3 decorator syntax natively (newer runtimes, bundlers) do
216
+ not get any advantage from the raw syntax - they just run the helper functions instead.
217
+ - This is the correct approach for a published package right now. Shipping raw `@decorator`
218
+ syntax would silently break consumers on Node versions or bundlers that do not handle it.
219
+
220
+ **Future:** When TC39 Stage 3 decorators are universally supported in all target runtimes
221
+ and bundlers, the build toolchain will be updated to pass decorator syntax through natively,
222
+ removing the helper-function overhead. Until that point, the helper-based output is the safe
223
+ and correct choice.
224
+
225
+ ## Compatibility
226
+
227
+ **All projects:** Built-in operators and sequences work without any decorator support. Import
228
+ and use normally.
229
+
230
+ **Projects with `experimentalDecorators: true`** (NestJS, Angular, InversifyJS): The built-in
231
+ operators and the functional plugin API (`createGeneratorOperator`, `createOperator`, and
232
+ related helpers) work without any changes. The class-based decorator plugin API (`@operator`,
233
+ `@terminal`, and related decorators) cannot be used because TypeScript supports only one
234
+ decorator model at a time. Use the functional API instead - it is fully equivalent and the
235
+ recommended path in these projects.
236
+
237
+ **Projects with TypeScript 5.0+ and no `experimentalDecorators`:** Full access to everything,
238
+ including the class-based plugin API decorators.
173
239
 
174
240
  ---
175
241
 
@@ -1,6 +1,5 @@
1
- import { L as Constructor, M as tyneqQueryNode, S as TyneqEnumerableBase, T as QueryPlanNode, Z as Nullable, _ as TyneqCachedSequence, a as Enumerator, b as TyneqSequence, i as Enumerable, m as OrderedEnumerable, n as CachedEnumerable, o as EnumeratorFactory, p as OperatorSource, r as Comparer, t as CacheResult, tt as BaseEnumerableSorter, y as TyneqOrderedSequence } from "./core.js";
1
+ import { k as Constructor, l as Enumerable, m as EnumeratorFactory, O as OperatorSource, $ as TyneqEnumerableBase, X as TyneqOrderedSequence, T as TyneqSequence, N as Nullable, D as OrderedEnumerable, _ as tyneqQueryNode, e as QueryPlanNode, C as Comparer, E as Enumerator, a0 as BaseEnumerableSorter, V as TyneqCachedSequence, i as CachedEnumerable, h as CacheResult } from './core-DR17XN89.js';
2
2
 
3
- //#region src/plugin/decorators/operator.d.ts
4
3
  /**
5
4
  * Class decorator that registers a `TyneqEnumerator` subclass as an operator on every sequence.
6
5
  *
@@ -34,8 +33,7 @@ import { L as Constructor, M as tyneqQueryNode, S as TyneqEnumerableBase, T as Q
34
33
  * @group Decorators
35
34
  */
36
35
  declare function operator<TArgs extends unknown[] = never>(name: string, category: "streaming" | "buffer", validate?: (...args: TArgs) => void): <TClass extends new (...args: any[]) => any>(target: TClass, _context: ClassDecoratorContext) => TClass;
37
- //#endregion
38
- //#region src/plugin/decorators/orderedOperator.d.ts
36
+
39
37
  /**
40
38
  * Class decorator that registers a `TyneqOrderedEnumerator` subclass as an operator
41
39
  * available only on ordered sequences.
@@ -70,8 +68,7 @@ declare function operator<TArgs extends unknown[] = never>(name: string, categor
70
68
  * @group Decorators
71
69
  */
72
70
  declare function orderedOperator<TArgs extends unknown[] = never>(name: string, category: "streaming" | "buffer", validate?: (...args: TArgs) => void): <TClass extends Constructor<any>>(target: TClass, _context: ClassDecoratorContext<TClass>) => TClass;
73
- //#endregion
74
- //#region src/plugin/decorators/cachedOperator.d.ts
71
+
75
72
  /**
76
73
  * Class decorator that registers a `TyneqCachedEnumerator` subclass as an operator
77
74
  * available only on cached sequences.
@@ -104,8 +101,7 @@ declare function orderedOperator<TArgs extends unknown[] = never>(name: string,
104
101
  * @group Decorators
105
102
  */
106
103
  declare function cachedOperator<TArgs extends unknown[] = never>(name: string, category: "streaming" | "buffer", validate?: (...args: TArgs) => void): <TClass extends Constructor<any>>(target: TClass, _context: ClassDecoratorContext<TClass>) => TClass;
107
- //#endregion
108
- //#region src/plugin/decorators/terminal.d.ts
104
+
109
105
  /**
110
106
  * Class decorator that registers a class as a terminal operator.
111
107
  *
@@ -134,10 +130,9 @@ declare function cachedOperator<TArgs extends unknown[] = never>(name: string, c
134
130
  * @group Decorators
135
131
  */
136
132
  declare function terminal<TArgs extends unknown[] = never>(name: string, validate?: (...args: TArgs) => void): <TClass extends new (...args: any[]) => {
137
- process(): unknown;
133
+ process(): unknown;
138
134
  }>(target: TClass, _context: ClassDecoratorContext) => TClass;
139
- //#endregion
140
- //#region src/plugin/decorators/orderedTerminal.d.ts
135
+
141
136
  /**
142
137
  * Class decorator that registers a `TyneqOrderedTerminalOperator` subclass as a terminal
143
138
  * operator available only on ordered sequences.
@@ -165,10 +160,9 @@ declare function terminal<TArgs extends unknown[] = never>(name: string, validat
165
160
  * @group Decorators
166
161
  */
167
162
  declare function orderedTerminal<TArgs extends unknown[] = never>(name: string, validate?: (...args: TArgs) => void): <TClass extends Constructor<{
168
- process(): unknown;
163
+ process(): unknown;
169
164
  }>>(target: TClass, _context: ClassDecoratorContext<TClass>) => TClass;
170
- //#endregion
171
- //#region src/plugin/decorators/cachedTerminal.d.ts
165
+
172
166
  /**
173
167
  * Class decorator that registers a `TyneqCachedTerminalOperator` subclass as a terminal
174
168
  * operator available only on cached sequences.
@@ -192,10 +186,9 @@ declare function orderedTerminal<TArgs extends unknown[] = never>(name: string,
192
186
  * @group Decorators
193
187
  */
194
188
  declare function cachedTerminal<TArgs extends unknown[] = never>(name: string, validate?: (...args: TArgs) => void): <TClass extends Constructor<{
195
- process(): unknown;
189
+ process(): unknown;
196
190
  }>>(target: TClass, _context: ClassDecoratorContext<TClass>) => TClass;
197
- //#endregion
198
- //#region src/plugin/registration/createOperator.d.ts
191
+
199
192
  /**
200
193
  * Registers a streaming or buffering operator using a factory function.
201
194
  *
@@ -238,14 +231,13 @@ declare function cachedTerminal<TArgs extends unknown[] = never>(name: string, v
238
231
  * @group Factory Functions
239
232
  */
240
233
  declare function createOperator<TSource, TArgs extends unknown[], TResult>(config: {
241
- name: string;
242
- category: "streaming" | "buffer";
243
- factory: (source: Enumerable<TSource>, ...args: TArgs) => EnumeratorFactory<TResult>;
244
- validate?: (...args: NoInfer<TArgs>) => void;
245
- source?: OperatorSource;
234
+ name: string;
235
+ category: "streaming" | "buffer";
236
+ factory: (source: Enumerable<TSource>, ...args: TArgs) => EnumeratorFactory<TResult>;
237
+ validate?: (...args: NoInfer<TArgs>) => void;
238
+ source?: OperatorSource;
246
239
  }): void;
247
- //#endregion
248
- //#region src/plugin/registration/createGeneratorOperator.d.ts
240
+
249
241
  /**
250
242
  * Registers an operator using a generator function.
251
243
  *
@@ -299,14 +291,13 @@ declare function createOperator<TSource, TArgs extends unknown[], TResult>(confi
299
291
  * @group Factory Functions
300
292
  */
301
293
  declare function createGeneratorOperator<TSource, TArgs extends unknown[], TResult>(config: {
302
- name: string;
303
- category?: "streaming" | "buffer";
304
- generator: (source: Iterable<TSource>, ...args: TArgs) => IterableIterator<TResult>;
305
- validate?: (...args: NoInfer<TArgs>) => void;
306
- source?: OperatorSource;
294
+ name: string;
295
+ category?: "streaming" | "buffer";
296
+ generator: (source: Iterable<TSource>, ...args: TArgs) => IterableIterator<TResult>;
297
+ validate?: (...args: NoInfer<TArgs>) => void;
298
+ source?: OperatorSource;
307
299
  }): void;
308
- //#endregion
309
- //#region src/core/ordering/TyneqOrderedEnumerable.d.ts
300
+
310
301
  /**
311
302
  * Concrete implementation of {@link TyneqOrderedSequence}.
312
303
  *
@@ -317,25 +308,24 @@ declare function createGeneratorOperator<TSource, TArgs extends unknown[], TResu
317
308
  * @internal
318
309
  */
319
310
  declare class TyneqOrderedEnumerable<TSource, TKey> extends TyneqEnumerableBase<TSource> implements TyneqOrderedSequence<TSource> {
320
- private readonly keySelector;
321
- private readonly comparer;
322
- private readonly descending;
323
- readonly source: TyneqSequence<TSource>;
324
- readonly parent: Nullable<OrderedEnumerable<TSource>>;
325
- readonly [tyneqQueryNode]: Nullable<QueryPlanNode>;
326
- constructor(source: TyneqSequence<TSource>, keySelector: (item: TSource) => TKey, comparer: Comparer<TKey>, descending: boolean, parent?: OrderedEnumerable<TSource>, node?: Nullable<QueryPlanNode>);
327
- asc(): TyneqOrderedSequence<TSource>;
328
- desc(): TyneqOrderedSequence<TSource>;
329
- getEnumerator(): Enumerator<TSource>;
330
- getSorter(next: Nullable<BaseEnumerableSorter<TSource>>): BaseEnumerableSorter<TSource>;
331
- thenBy<UKey>(keySelector: (item: TSource) => UKey, comparer?: Comparer<UKey>): TyneqOrderedSequence<TSource>;
332
- thenByDescending<UKey>(keySelector: (item: TSource) => UKey, comparer?: Comparer<UKey>): TyneqOrderedSequence<TSource>;
333
- protected createEnumerable<TResult>(factory: EnumeratorFactory<TResult>, node: Nullable<QueryPlanNode>): TyneqSequence<TResult>;
334
- protected createOrderedEnumerable<TKey>(keySelector: (x: TSource) => TKey, comparer: Comparer<TKey>, descending: boolean, node: Nullable<QueryPlanNode>): TyneqOrderedSequence<TSource>;
335
- protected createCachedEnumerable(source: TyneqSequence<TSource>, node: Nullable<QueryPlanNode>): TyneqCachedSequence<TSource>;
311
+ private readonly keySelector;
312
+ private readonly comparer;
313
+ private readonly descending;
314
+ readonly source: TyneqSequence<TSource>;
315
+ readonly parent: Nullable<OrderedEnumerable<TSource>>;
316
+ readonly [tyneqQueryNode]: Nullable<QueryPlanNode>;
317
+ constructor(source: TyneqSequence<TSource>, keySelector: (item: TSource) => TKey, comparer: Comparer<TKey>, descending: boolean, parent?: OrderedEnumerable<TSource>, node?: Nullable<QueryPlanNode>);
318
+ asc(): TyneqOrderedSequence<TSource>;
319
+ desc(): TyneqOrderedSequence<TSource>;
320
+ getEnumerator(): Enumerator<TSource>;
321
+ getSorter(next: Nullable<BaseEnumerableSorter<TSource>>): BaseEnumerableSorter<TSource>;
322
+ thenBy<UKey>(keySelector: (item: TSource) => UKey, comparer?: Comparer<UKey>): TyneqOrderedSequence<TSource>;
323
+ thenByDescending<UKey>(keySelector: (item: TSource) => UKey, comparer?: Comparer<UKey>): TyneqOrderedSequence<TSource>;
324
+ protected createEnumerable<TResult>(factory: EnumeratorFactory<TResult>, node: Nullable<QueryPlanNode>): TyneqSequence<TResult>;
325
+ protected createOrderedEnumerable<TKey>(keySelector: (x: TSource) => TKey, comparer: Comparer<TKey>, descending: boolean, node: Nullable<QueryPlanNode>): TyneqOrderedSequence<TSource>;
326
+ protected createCachedEnumerable(source: TyneqSequence<TSource>, node: Nullable<QueryPlanNode>): TyneqCachedSequence<TSource>;
336
327
  }
337
- //#endregion
338
- //#region src/plugin/registration/createOrderedOperator.d.ts
328
+
339
329
  /**
340
330
  * Registers a factory function as an operator available only on ordered sequences,
341
331
  * where the factory fully controls the return type.
@@ -376,14 +366,13 @@ declare class TyneqOrderedEnumerable<TSource, TKey> extends TyneqEnumerableBase<
376
366
  * @group Factory Functions
377
367
  */
378
368
  declare function createOrderedOperator<TSource, TArgs extends unknown[]>(config: {
379
- name: string;
380
- category: "streaming" | "buffer";
381
- factory: (source: TyneqOrderedEnumerable<TSource, unknown>, node: QueryPlanNode, ...args: TArgs) => TyneqOrderedSequence<TSource>;
382
- validate?: (...args: NoInfer<TArgs>) => void;
383
- source?: OperatorSource;
369
+ name: string;
370
+ category: "streaming" | "buffer";
371
+ factory: (source: TyneqOrderedEnumerable<TSource, unknown>, node: QueryPlanNode, ...args: TArgs) => TyneqOrderedSequence<TSource>;
372
+ validate?: (...args: NoInfer<TArgs>) => void;
373
+ source?: OperatorSource;
384
374
  }): void;
385
- //#endregion
386
- //#region src/core/TyneqCachedEnumerable.d.ts
375
+
387
376
  /**
388
377
  * Concrete implementation of {@link TyneqCachedSequence} - caches elements incrementally.
389
378
  *
@@ -395,21 +384,20 @@ declare function createOrderedOperator<TSource, TArgs extends unknown[]>(config:
395
384
  * @internal
396
385
  */
397
386
  declare class TyneqCachedEnumerable<TSource> extends TyneqEnumerableBase<TSource> implements TyneqCachedSequence<TSource>, CachedEnumerable<TSource> {
398
- private source;
399
- private cache;
400
- private done;
401
- private sourceEnumerator;
402
- readonly [tyneqQueryNode]: Nullable<QueryPlanNode>;
403
- constructor(source: TyneqSequence<TSource>, node?: Nullable<QueryPlanNode>);
404
- getEnumerator(): Enumerator<TSource>;
405
- refresh(): TyneqCachedSequence<TSource>;
406
- tryGetAtFromCache(index: number): CacheResult<TSource>;
407
- protected createEnumerable<TResult>(factory: EnumeratorFactory<TResult>, node: Nullable<QueryPlanNode>): TyneqSequence<TResult>;
408
- protected createOrderedEnumerable<TKey>(keySelector: (x: TSource) => TKey, comparer: Comparer<TKey>, descending: boolean, node: Nullable<QueryPlanNode>): TyneqOrderedSequence<TSource>;
409
- protected createCachedEnumerable(source: TyneqSequence<TSource>, node: Nullable<QueryPlanNode>): TyneqCachedSequence<TSource>;
387
+ private source;
388
+ private cache;
389
+ private done;
390
+ private sourceEnumerator;
391
+ readonly [tyneqQueryNode]: Nullable<QueryPlanNode>;
392
+ constructor(source: TyneqSequence<TSource>, node?: Nullable<QueryPlanNode>);
393
+ getEnumerator(): Enumerator<TSource>;
394
+ refresh(): TyneqCachedSequence<TSource>;
395
+ tryGetAtFromCache(index: number): CacheResult<TSource>;
396
+ protected createEnumerable<TResult>(factory: EnumeratorFactory<TResult>, node: Nullable<QueryPlanNode>): TyneqSequence<TResult>;
397
+ protected createOrderedEnumerable<TKey>(keySelector: (x: TSource) => TKey, comparer: Comparer<TKey>, descending: boolean, node: Nullable<QueryPlanNode>): TyneqOrderedSequence<TSource>;
398
+ protected createCachedEnumerable(source: TyneqSequence<TSource>, node: Nullable<QueryPlanNode>): TyneqCachedSequence<TSource>;
410
399
  }
411
- //#endregion
412
- //#region src/plugin/registration/createCachedOperator.d.ts
400
+
413
401
  /**
414
402
  * Registers a factory function as an operator available only on cached sequences,
415
403
  * where the factory fully controls the return type.
@@ -443,14 +431,13 @@ declare class TyneqCachedEnumerable<TSource> extends TyneqEnumerableBase<TSource
443
431
  * @group Factory Functions
444
432
  */
445
433
  declare function createCachedOperator<TSource, TArgs extends unknown[]>(config: {
446
- name: string;
447
- category: "streaming" | "buffer";
448
- factory: (source: TyneqCachedEnumerable<TSource>, node: QueryPlanNode, ...args: TArgs) => TyneqCachedSequence<TSource>;
449
- validate?: (...args: NoInfer<TArgs>) => void;
450
- source?: OperatorSource;
434
+ name: string;
435
+ category: "streaming" | "buffer";
436
+ factory: (source: TyneqCachedEnumerable<TSource>, node: QueryPlanNode, ...args: TArgs) => TyneqCachedSequence<TSource>;
437
+ validate?: (...args: NoInfer<TArgs>) => void;
438
+ source?: OperatorSource;
451
439
  }): void;
452
- //#endregion
453
- //#region src/plugin/registration/createTerminalOperator.d.ts
440
+
454
441
  /**
455
442
  * Registers a terminal operator using a plain function.
456
443
  *
@@ -478,13 +465,12 @@ declare function createCachedOperator<TSource, TArgs extends unknown[]>(config:
478
465
  * @group Factory Functions
479
466
  */
480
467
  declare function createTerminalOperator<TSource, TArgs extends unknown[], TResult>(config: {
481
- name: string;
482
- execute: (source: Enumerable<TSource>, ...args: TArgs) => TResult;
483
- validate?: (...args: NoInfer<TArgs>) => void;
484
- source?: OperatorSource;
468
+ name: string;
469
+ execute: (source: Enumerable<TSource>, ...args: TArgs) => TResult;
470
+ validate?: (...args: NoInfer<TArgs>) => void;
471
+ source?: OperatorSource;
485
472
  }): void;
486
- //#endregion
487
- //#region src/plugin/registration/createOrderedTerminalOperator.d.ts
473
+
488
474
  /**
489
475
  * Registers a terminal operator available only on ordered sequences.
490
476
  *
@@ -512,13 +498,12 @@ declare function createTerminalOperator<TSource, TArgs extends unknown[], TResul
512
498
  * @group Factory Functions
513
499
  */
514
500
  declare function createOrderedTerminalOperator<TSource, TArgs extends unknown[], TResult>(config: {
515
- name: string;
516
- execute: (source: OrderedEnumerable<TSource>, ...args: TArgs) => TResult;
517
- validate?: (...args: NoInfer<TArgs>) => void;
518
- source?: OperatorSource;
501
+ name: string;
502
+ execute: (source: OrderedEnumerable<TSource>, ...args: TArgs) => TResult;
503
+ validate?: (...args: NoInfer<TArgs>) => void;
504
+ source?: OperatorSource;
519
505
  }): void;
520
- //#endregion
521
- //#region src/plugin/registration/createCachedTerminalOperator.d.ts
506
+
522
507
  /**
523
508
  * Registers a terminal operator available only on cached sequences.
524
509
  *
@@ -542,13 +527,12 @@ declare function createOrderedTerminalOperator<TSource, TArgs extends unknown[],
542
527
  * @group Factory Functions
543
528
  */
544
529
  declare function createCachedTerminalOperator<TSource, TArgs extends unknown[], TResult>(config: {
545
- name: string;
546
- execute: (source: CachedEnumerable<TSource>, ...args: TArgs) => TResult;
547
- validate?: (...args: NoInfer<TArgs>) => void;
548
- source?: OperatorSource;
530
+ name: string;
531
+ execute: (source: CachedEnumerable<TSource>, ...args: TArgs) => TResult;
532
+ validate?: (...args: NoInfer<TArgs>) => void;
533
+ source?: OperatorSource;
549
534
  }): void;
550
- //#endregion
551
- //#region src/core/enumerators/TyneqBaseEnumerator.d.ts
535
+
552
536
  /**
553
537
  * Abstract base class implementing the pull-iterator lifecycle for all Tyneq enumerators.
554
538
  *
@@ -569,50 +553,49 @@ declare function createCachedTerminalOperator<TSource, TArgs extends unknown[],
569
553
  * @group Plugin
570
554
  */
571
555
  declare abstract class TyneqBaseEnumerator<TInput, TOutput = TInput> implements Enumerator<TOutput> {
572
- private _initialized;
573
- private _completed;
574
- constructor();
575
- /** Advances the iterator, calling `initialize()` on first call. Idempotent after completion. */
576
- next(): IteratorResult<TOutput>;
577
- /** Terminates iteration early, disposes resources, and marks completed. Idempotent. */
578
- return(value?: unknown): IteratorResult<TOutput>;
579
- /** Called once before the first `handleNext()` invocation. Override to set up state. */
580
- protected initialize(): void;
581
- /** Wraps `value` in a non-done `IteratorResult`. */
582
- protected yield(value: TOutput): IteratorResult<TOutput>;
583
- /** Returns a done `IteratorResult`. */
584
- protected done(): IteratorResult<TOutput>;
585
- /**
586
- * Marks the enumerator completed and yields `value` as the final element.
587
- *
588
- * @remarks
589
- * Use when the last element must be emitted together with completion in one step.
590
- */
591
- protected doneWithYield(value: TOutput): IteratorResult<TOutput>;
592
- /**
593
- * Disposes resources, marks completed, and returns a done result.
594
- *
595
- * @remarks
596
- * Use inside `handleNext()` to terminate iteration before the source is exhausted.
597
- */
598
- protected earlyComplete(reason?: unknown): IteratorResult<TOutput>;
599
- /** Calls `disposeSource()` then `disposeAdditional()`. */
600
- protected dispose(value?: unknown): void;
601
- /** Override to dispose the upstream source enumerator. */
602
- protected disposeSource(): void;
603
- /**
604
- * Override to release any additional resources.
605
- *
606
- * @remarks
607
- * Called after `disposeSource()`. `value` is the return value passed to `return()`.
608
- * Must be idempotent and must not throw.
609
- */
610
- protected disposeAdditional(_value?: unknown): void;
611
- /** Produces the next element. Return `{ done: true }` to signal exhaustion. */
612
- protected abstract handleNext(): IteratorResult<TOutput>;
556
+ private _initialized;
557
+ private _completed;
558
+ constructor();
559
+ /** Advances the iterator, calling `initialize()` on first call. Idempotent after completion. */
560
+ next(): IteratorResult<TOutput>;
561
+ /** Terminates iteration early, disposes resources, and marks completed. Idempotent. */
562
+ return(value?: unknown): IteratorResult<TOutput>;
563
+ /** Called once before the first `handleNext()` invocation. Override to set up state. */
564
+ protected initialize(): void;
565
+ /** Wraps `value` in a non-done `IteratorResult`. */
566
+ protected yield(value: TOutput): IteratorResult<TOutput>;
567
+ /** Returns a done `IteratorResult`. */
568
+ protected done(): IteratorResult<TOutput>;
569
+ /**
570
+ * Marks the enumerator completed and yields `value` as the final element.
571
+ *
572
+ * @remarks
573
+ * Use when the last element must be emitted together with completion in one step.
574
+ */
575
+ protected doneWithYield(value: TOutput): IteratorResult<TOutput>;
576
+ /**
577
+ * Disposes resources, marks completed, and returns a done result.
578
+ *
579
+ * @remarks
580
+ * Use inside `handleNext()` to terminate iteration before the source is exhausted.
581
+ */
582
+ protected earlyComplete(reason?: unknown): IteratorResult<TOutput>;
583
+ /** Calls `disposeSource()` then `disposeAdditional()`. */
584
+ protected dispose(value?: unknown): void;
585
+ /** Override to dispose the upstream source enumerator. */
586
+ protected disposeSource(): void;
587
+ /**
588
+ * Override to release any additional resources.
589
+ *
590
+ * @remarks
591
+ * Called after `disposeSource()`. `value` is the return value passed to `return()`.
592
+ * Must be idempotent and must not throw.
593
+ */
594
+ protected disposeAdditional(_value?: unknown): void;
595
+ /** Produces the next element. Return `{ done: true }` to signal exhaustion. */
596
+ protected abstract handleNext(): IteratorResult<TOutput>;
613
597
  }
614
- //#endregion
615
- //#region src/core/enumerators/TyneqEnumerator.d.ts
598
+
616
599
  /**
617
600
  * Base class for all pipeline operator enumerators (streaming and buffering).
618
601
  *
@@ -626,13 +609,12 @@ declare abstract class TyneqBaseEnumerator<TInput, TOutput = TInput> implements
626
609
  * @group Plugin
627
610
  */
628
611
  declare abstract class TyneqEnumerator<TInput, TOutput = TInput> extends TyneqBaseEnumerator<TInput, TOutput> {
629
- protected readonly sourceEnumerator: Enumerator<TInput>;
630
- private sourceDisposed;
631
- constructor(sourceEnumerator: Enumerator<TInput>);
632
- protected disposeSource(): void;
612
+ protected readonly sourceEnumerator: Enumerator<TInput>;
613
+ private sourceDisposed;
614
+ constructor(sourceEnumerator: Enumerator<TInput>);
615
+ protected disposeSource(): void;
633
616
  }
634
- //#endregion
635
- //#region src/core/enumerators/TyneqOrderedEnumerator.d.ts
617
+
636
618
  /**
637
619
  * Base class for enumerators that need the full ordered sequence (not just an Enumerator<T>).
638
620
  * Lifecycle of the source is owned by the sequence, not the enumerator.
@@ -641,12 +623,11 @@ declare abstract class TyneqEnumerator<TInput, TOutput = TInput> extends TyneqBa
641
623
  * @internal
642
624
  */
643
625
  declare abstract class TyneqOrderedEnumerator<TSource> extends TyneqBaseEnumerator<TSource> {
644
- protected readonly orderedSource: OrderedEnumerable<TSource>;
645
- constructor(orderedSource: OrderedEnumerable<TSource>);
646
- protected disposeSource(): void;
626
+ protected readonly orderedSource: OrderedEnumerable<TSource>;
627
+ constructor(orderedSource: OrderedEnumerable<TSource>);
628
+ protected disposeSource(): void;
647
629
  }
648
- //#endregion
649
- //#region src/core/enumerators/TyneqCachedEnumerator.d.ts
630
+
650
631
  /**
651
632
  * Base class for enumerators that need the full cached sequence (not just an Enumerator<T>).
652
633
  * Lifecycle of the source is owned by the sequence, not the enumerator.
@@ -655,12 +636,11 @@ declare abstract class TyneqOrderedEnumerator<TSource> extends TyneqBaseEnumerat
655
636
  * @internal
656
637
  */
657
638
  declare abstract class TyneqCachedEnumerator<TSource> extends TyneqBaseEnumerator<TSource> {
658
- protected readonly cachedSource: CachedEnumerable<TSource>;
659
- constructor(cachedSource: CachedEnumerable<TSource>);
660
- protected disposeSource(): void;
639
+ protected readonly cachedSource: CachedEnumerable<TSource>;
640
+ constructor(cachedSource: CachedEnumerable<TSource>);
641
+ protected disposeSource(): void;
661
642
  }
662
- //#endregion
663
- //#region src/core/terminal/TyneqTerminalOperator.d.ts
643
+
664
644
  /**
665
645
  * Abstract base for all terminal operators.
666
646
  *
@@ -674,13 +654,12 @@ declare abstract class TyneqCachedEnumerator<TSource> extends TyneqBaseEnumerato
674
654
  * @group Plugin
675
655
  */
676
656
  declare abstract class TyneqTerminalOperator<TSource, TResult = TSource> {
677
- protected readonly source: Enumerable<TSource>;
678
- constructor(source: Enumerable<TSource>);
679
- /** Executes the terminal operation and returns the result. */
680
- abstract process(): TResult;
657
+ protected readonly source: Enumerable<TSource>;
658
+ constructor(source: Enumerable<TSource>);
659
+ /** Executes the terminal operation and returns the result. */
660
+ abstract process(): TResult;
681
661
  }
682
- //#endregion
683
- //#region src/core/terminal/TyneqOrderedTerminalOperator.d.ts
662
+
684
663
  /**
685
664
  * Abstract base for terminal operators that require a fully ordered sequence.
686
665
  *
@@ -694,13 +673,12 @@ declare abstract class TyneqTerminalOperator<TSource, TResult = TSource> {
694
673
  * @group Plugin
695
674
  */
696
675
  declare abstract class TyneqOrderedTerminalOperator<TSource, TResult = TSource> {
697
- protected readonly source: OrderedEnumerable<TSource>;
698
- constructor(source: OrderedEnumerable<TSource>);
699
- /** Executes the terminal operation and returns the result. */
700
- abstract process(): TResult;
676
+ protected readonly source: OrderedEnumerable<TSource>;
677
+ constructor(source: OrderedEnumerable<TSource>);
678
+ /** Executes the terminal operation and returns the result. */
679
+ abstract process(): TResult;
701
680
  }
702
- //#endregion
703
- //#region src/core/terminal/TyneqCachedTerminalOperator.d.ts
681
+
704
682
  /**
705
683
  * Abstract base for terminal operators that require a fully cached sequence.
706
684
  *
@@ -714,11 +692,10 @@ declare abstract class TyneqOrderedTerminalOperator<TSource, TResult = TSource>
714
692
  * @group Plugin
715
693
  */
716
694
  declare abstract class TyneqCachedTerminalOperator<TSource, TResult = TSource> {
717
- protected readonly source: CachedEnumerable<TSource>;
718
- constructor(source: CachedEnumerable<TSource>);
719
- /** Executes the terminal operation and returns the result. */
720
- abstract process(): TResult;
695
+ protected readonly source: CachedEnumerable<TSource>;
696
+ constructor(source: CachedEnumerable<TSource>);
697
+ /** Executes the terminal operation and returns the result. */
698
+ abstract process(): TResult;
721
699
  }
722
- //#endregion
723
- export { operator as S, cachedTerminal as _, TyneqOrderedEnumerator as a, cachedOperator as b, createCachedTerminalOperator as c, createCachedOperator as d, TyneqCachedEnumerable as f, createOperator as g, createGeneratorOperator as h, TyneqCachedEnumerator as i, createOrderedTerminalOperator as l, TyneqOrderedEnumerable as m, TyneqOrderedTerminalOperator as n, TyneqEnumerator as o, createOrderedOperator as p, TyneqTerminalOperator as r, TyneqBaseEnumerator as s, TyneqCachedTerminalOperator as t, createTerminalOperator as u, orderedTerminal as v, orderedOperator as x, terminal as y };
724
- //# sourceMappingURL=TyneqCachedTerminalOperator.d.ts.map
700
+
701
+ export { TyneqBaseEnumerator as T, TyneqCachedEnumerator as a, TyneqCachedTerminalOperator as b, TyneqEnumerator as c, TyneqOrderedEnumerator as d, TyneqOrderedTerminalOperator as e, TyneqTerminalOperator as f, cachedOperator as g, cachedTerminal as h, createCachedOperator as i, createCachedTerminalOperator as j, createGeneratorOperator as k, createOperator as l, createOrderedOperator as m, createOrderedTerminalOperator as n, createTerminalOperator as o, operator as p, orderedOperator as q, orderedTerminal as r, TyneqCachedEnumerable as s, terminal as t, TyneqOrderedEnumerable as u };