tyneq 1.0.1 → 1.0.2

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 (35) hide show
  1. package/dist/{TyneqCachedTerminalOperator-DTVuBGMn.d.ts → TyneqCachedTerminalOperator-BrW77zIy.d.ts} +180 -2
  2. package/dist/{TyneqCachedTerminalOperator-QzqAHJSE.d.cts → TyneqCachedTerminalOperator-EaNiNt61.d.cts} +180 -2
  3. package/dist/{chunk-KT2G2VJZ.js → chunk-5R4AALC7.js} +0 -1
  4. package/dist/{chunk-D2KVCXTF.cjs → chunk-C5PBY3ZU.cjs} +2 -3
  5. package/dist/{chunk-6QXGRDRO.cjs → chunk-OWKUE3AC.cjs} +0 -1
  6. package/dist/{chunk-DVHUFMNJ.js → chunk-PCBN5AFG.js} +1 -2
  7. package/dist/{chunk-TOFO2EMH.cjs → chunk-VJAICXA6.cjs} +232 -230
  8. package/dist/{chunk-BKSTSJTW.js → chunk-ZP6WMZCK.js} +5 -3
  9. package/dist/{core-DR17XN89.d.cts → core-C54TSmgW.d.cts} +1 -1
  10. package/dist/{core-DR17XN89.d.ts → core-C54TSmgW.d.ts} +1 -1
  11. package/dist/index.cjs +60 -61
  12. package/dist/index.d.cts +4 -182
  13. package/dist/index.d.ts +4 -182
  14. package/dist/index.js +3 -4
  15. package/dist/plugin/index.cjs +5 -4
  16. package/dist/plugin/index.d.cts +2 -2
  17. package/dist/plugin/index.d.ts +2 -2
  18. package/dist/plugin/index.js +4 -3
  19. package/dist/utility/index.cjs +3 -4
  20. package/dist/utility/index.d.cts +1 -1
  21. package/dist/utility/index.d.ts +1 -1
  22. package/dist/utility/index.js +2 -3
  23. package/package.json +1 -1
  24. package/dist/chunk-6QXGRDRO.cjs.map +0 -1
  25. package/dist/chunk-BKSTSJTW.js.map +0 -1
  26. package/dist/chunk-D2KVCXTF.cjs.map +0 -1
  27. package/dist/chunk-DVHUFMNJ.js.map +0 -1
  28. package/dist/chunk-KT2G2VJZ.js.map +0 -1
  29. package/dist/chunk-TOFO2EMH.cjs.map +0 -1
  30. package/dist/index.cjs.map +0 -1
  31. package/dist/index.js.map +0 -1
  32. package/dist/plugin/index.cjs.map +0 -1
  33. package/dist/plugin/index.js.map +0 -1
  34. package/dist/utility/index.cjs.map +0 -1
  35. package/dist/utility/index.js.map +0 -1
@@ -9,7 +9,7 @@ import {
9
9
  __runInitializers,
10
10
  nameof,
11
11
  reflect
12
- } from "./chunk-KT2G2VJZ.js";
12
+ } from "./chunk-5R4AALC7.js";
13
13
 
14
14
  // src/core/enumerators/TyneqBaseEnumerator.ts
15
15
  var TyneqBaseEnumerator = class {
@@ -563,8 +563,11 @@ var OperatorRegistry = class {
563
563
  var _a6;
564
564
  return (_a6 = reflect(targetClass.prototype).tryGetMethod(name)) == null ? void 0 : _a6.value;
565
565
  });
566
+ const lazyMetadata = new Lazy(() => new OperatorMetadata(name, kind, "internal", targetClass));
566
567
  const entry = {
567
- metadata: new OperatorMetadata(name, kind, "internal", targetClass),
568
+ get metadata() {
569
+ return lazyMetadata.value;
570
+ },
568
571
  impl: function(...args) {
569
572
  const method = lazyMethod.value;
570
573
  if (!method) {
@@ -3783,4 +3786,3 @@ export {
3783
3786
  TyneqOrderedTerminalOperator,
3784
3787
  TyneqCachedTerminalOperator
3785
3788
  };
3786
- //# sourceMappingURL=chunk-BKSTSJTW.js.map
@@ -1387,4 +1387,4 @@ type OperatorKind = OperatorCategory | "cache" | "extension" | "unknown";
1387
1387
  /** Constructor type for a sequence class. */
1388
1388
  type SequenceConstructor = abstract new (...args: any[]) => TyneqEnumerableCore<unknown>;
1389
1389
 
1390
- export { TyneqEnumerableBase as $, type Action as A, type BoundMethod as B, type Comparer as C, type OrderedEnumerable as D, type Enumerator as E, type Factory as F, type GenericFunction as G, type HasLength as H, type ItemSelector as I, QueryNode as J, type KeyValuePair as K, type QueryPlanTraversalDirection as L, type Maybe as M, type Nullable as N, type OperatorSource as O, type Predicate as P, type QueryPlanVisitor as Q, type SequenceFactory as R, type SequenceConstructor as S, type TyneqSequence as T, type SourceKind as U, type TyneqCachedSequence as V, type TyneqEnumerableFactory as W, type TyneqOrderedSequence as X, type WithProperties as Y, isSourceNode as Z, tyneqQueryNode as _, type Optional as a, BaseEnumerableSorter as a0, OperatorMetadata as b, type OperatorEntry as c, type QueryPlanPrinterOptions as d, type QueryPlanNode as e, type QueryPlanWalkerOptions as f, type Assume as g, type CacheResult as h, type CachedEnumerable as i, type Cast as j, type Constructor as k, type Enumerable as l, type EnumeratorFactory as m, type EqualityComparer as n, type FieldKeys as o, type Func as p, type InstanceOf as q, type ItemAction as r, type ItemPredicate as s, type IteratorFactory as t, type Method as u, type MethodKeys as v, type MinMaxResult as w, type NoInfer as x, type OperatorCategory as y, type OperatorKind as z };
1390
+ export { TyneqEnumerableBase as $, type Action as A, type BoundMethod as B, type Comparer as C, type OrderedEnumerable as D, type Enumerator as E, type Factory as F, type GenericFunction as G, type HasLength as H, type ItemSelector as I, QueryNode as J, type KeyValuePair as K, type QueryPlanTraversalDirection as L, type Maybe as M, type Nullable as N, type OperatorSource as O, type Predicate as P, type QueryPlanVisitor as Q, type SequenceFactory as R, type SequenceConstructor as S, type TyneqSequence as T, type SourceKind as U, type TyneqCachedSequence as V, type TyneqEnumerableFactory as W, type TyneqOrderedSequence as X, type WithProperties as Y, isSourceNode as Z, tyneqQueryNode as _, type Optional as a, BaseEnumerableSorter as a0, OperatorMetadata as b, type QueryPlanPrinterOptions as c, type QueryPlanNode as d, type QueryPlanWalkerOptions as e, type Assume as f, type CacheResult as g, type CachedEnumerable as h, type Cast as i, type Constructor as j, type Enumerable as k, type EnumeratorFactory as l, type EqualityComparer as m, type FieldKeys as n, type Func as o, type InstanceOf as p, type ItemAction as q, type ItemPredicate as r, type IteratorFactory as s, type Method as t, type MethodKeys as u, type MinMaxResult as v, type NoInfer as w, type OperatorCategory as x, type OperatorEntry as y, type OperatorKind as z };
@@ -1387,4 +1387,4 @@ type OperatorKind = OperatorCategory | "cache" | "extension" | "unknown";
1387
1387
  /** Constructor type for a sequence class. */
1388
1388
  type SequenceConstructor = abstract new (...args: any[]) => TyneqEnumerableCore<unknown>;
1389
1389
 
1390
- export { TyneqEnumerableBase as $, type Action as A, type BoundMethod as B, type Comparer as C, type OrderedEnumerable as D, type Enumerator as E, type Factory as F, type GenericFunction as G, type HasLength as H, type ItemSelector as I, QueryNode as J, type KeyValuePair as K, type QueryPlanTraversalDirection as L, type Maybe as M, type Nullable as N, type OperatorSource as O, type Predicate as P, type QueryPlanVisitor as Q, type SequenceFactory as R, type SequenceConstructor as S, type TyneqSequence as T, type SourceKind as U, type TyneqCachedSequence as V, type TyneqEnumerableFactory as W, type TyneqOrderedSequence as X, type WithProperties as Y, isSourceNode as Z, tyneqQueryNode as _, type Optional as a, BaseEnumerableSorter as a0, OperatorMetadata as b, type OperatorEntry as c, type QueryPlanPrinterOptions as d, type QueryPlanNode as e, type QueryPlanWalkerOptions as f, type Assume as g, type CacheResult as h, type CachedEnumerable as i, type Cast as j, type Constructor as k, type Enumerable as l, type EnumeratorFactory as m, type EqualityComparer as n, type FieldKeys as o, type Func as p, type InstanceOf as q, type ItemAction as r, type ItemPredicate as s, type IteratorFactory as t, type Method as u, type MethodKeys as v, type MinMaxResult as w, type NoInfer as x, type OperatorCategory as y, type OperatorKind as z };
1390
+ export { TyneqEnumerableBase as $, type Action as A, type BoundMethod as B, type Comparer as C, type OrderedEnumerable as D, type Enumerator as E, type Factory as F, type GenericFunction as G, type HasLength as H, type ItemSelector as I, QueryNode as J, type KeyValuePair as K, type QueryPlanTraversalDirection as L, type Maybe as M, type Nullable as N, type OperatorSource as O, type Predicate as P, type QueryPlanVisitor as Q, type SequenceFactory as R, type SequenceConstructor as S, type TyneqSequence as T, type SourceKind as U, type TyneqCachedSequence as V, type TyneqEnumerableFactory as W, type TyneqOrderedSequence as X, type WithProperties as Y, isSourceNode as Z, tyneqQueryNode as _, type Optional as a, BaseEnumerableSorter as a0, OperatorMetadata as b, type QueryPlanPrinterOptions as c, type QueryPlanNode as d, type QueryPlanWalkerOptions as e, type Assume as f, type CacheResult as g, type CachedEnumerable as h, type Cast as i, type Constructor as j, type Enumerable as k, type EnumeratorFactory as l, type EqualityComparer as m, type FieldKeys as n, type Func as o, type InstanceOf as p, type ItemAction as q, type ItemPredicate as r, type IteratorFactory as s, type Method as t, type MethodKeys as u, type MinMaxResult as v, type NoInfer as w, type OperatorCategory as x, type OperatorEntry as y, type OperatorKind as z };
package/dist/index.cjs CHANGED
@@ -33,11 +33,11 @@
33
33
 
34
34
 
35
35
 
36
- var _chunkTOFO2EMHcjs = require('./chunk-TOFO2EMH.cjs');
36
+ var _chunkVJAICXA6cjs = require('./chunk-VJAICXA6.cjs');
37
37
 
38
38
 
39
39
 
40
- var _chunkD2KVCXTFcjs = require('./chunk-D2KVCXTF.cjs');
40
+ var _chunkC5PBY3ZUcjs = require('./chunk-C5PBY3ZU.cjs');
41
41
 
42
42
 
43
43
 
@@ -54,10 +54,10 @@ var _chunkD2KVCXTFcjs = require('./chunk-D2KVCXTF.cjs');
54
54
 
55
55
 
56
56
 
57
- var _chunk6QXGRDROcjs = require('./chunk-6QXGRDRO.cjs');
57
+ var _chunkOWKUE3ACcjs = require('./chunk-OWKUE3AC.cjs');
58
58
 
59
59
  // src/core/generators/range.ts
60
- var RangeEnumerator = class extends _chunkTOFO2EMHcjs.TyneqBaseEnumerator {
60
+ var RangeEnumerator = class extends _chunkVJAICXA6cjs.TyneqBaseEnumerator {
61
61
  constructor(start, end) {
62
62
  super();
63
63
  this.current = start;
@@ -72,7 +72,7 @@ var RangeEnumerator = class extends _chunkTOFO2EMHcjs.TyneqBaseEnumerator {
72
72
  };
73
73
 
74
74
  // src/core/generators/random.ts
75
- var RandomEnumerator = class extends _chunkTOFO2EMHcjs.TyneqBaseEnumerator {
75
+ var RandomEnumerator = class extends _chunkVJAICXA6cjs.TyneqBaseEnumerator {
76
76
  constructor(count, randomizer) {
77
77
  super();
78
78
  this.yieldedCount = 0;
@@ -91,8 +91,8 @@ var RandomEnumerator = class extends _chunkTOFO2EMHcjs.TyneqBaseEnumerator {
91
91
  // src/core/EnumerableAdapter.ts
92
92
  var EnumerableAdapter = class {
93
93
  constructor(iterable) {
94
- _chunk6QXGRDROcjs.ArgumentUtility.checkNotOptional({ iterable });
95
- _chunk6QXGRDROcjs.ArgumentUtility.checkIterable({ iterable });
94
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ iterable });
95
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkIterable({ iterable });
96
96
  this.iterable = iterable;
97
97
  }
98
98
  [Symbol.iterator]() {
@@ -104,7 +104,7 @@ var EnumerableAdapter = class {
104
104
  };
105
105
 
106
106
  // src/core/generators/repeat.ts
107
- var RepeatEnumerator = class extends _chunkTOFO2EMHcjs.TyneqBaseEnumerator {
107
+ var RepeatEnumerator = class extends _chunkVJAICXA6cjs.TyneqBaseEnumerator {
108
108
  constructor(value, count) {
109
109
  super();
110
110
  this.yieldedCount = 0;
@@ -121,7 +121,7 @@ var RepeatEnumerator = class extends _chunkTOFO2EMHcjs.TyneqBaseEnumerator {
121
121
  };
122
122
 
123
123
  // src/core/generators/generate.ts
124
- var GenerateEnumerator = class extends _chunkTOFO2EMHcjs.TyneqBaseEnumerator {
124
+ var GenerateEnumerator = class extends _chunkVJAICXA6cjs.TyneqBaseEnumerator {
125
125
  constructor(seed, next, count) {
126
126
  super();
127
127
  this.yieldedCount = 0;
@@ -142,7 +142,7 @@ var GenerateEnumerator = class extends _chunkTOFO2EMHcjs.TyneqBaseEnumerator {
142
142
  };
143
143
 
144
144
  // src/core/generators/sourceConcat.ts
145
- var SourceConcatEnumerator = class extends _chunkTOFO2EMHcjs.TyneqBaseEnumerator {
145
+ var SourceConcatEnumerator = class extends _chunkVJAICXA6cjs.TyneqBaseEnumerator {
146
146
  constructor(...sources) {
147
147
  super();
148
148
  this.currentSourceIndex = 0;
@@ -175,14 +175,14 @@ var SourceConcatEnumerator = class extends _chunkTOFO2EMHcjs.TyneqBaseEnumerator
175
175
 
176
176
  // src/core/tyneq.ts
177
177
  var _concat_dec, _generate_dec, _repeat_dec, _empty_dec, _range_dec, _random_dec, _from_dec, _init;
178
- _from_dec = [_chunkTOFO2EMHcjs.source.call(void 0, { source: "internal" })], _random_dec = [_chunkTOFO2EMHcjs.source.call(void 0, { source: "internal" })], _range_dec = [_chunkTOFO2EMHcjs.source.call(void 0, { source: "internal" })], _empty_dec = [_chunkTOFO2EMHcjs.source.call(void 0, { source: "internal" })], _repeat_dec = [_chunkTOFO2EMHcjs.source.call(void 0, { source: "internal" })], _generate_dec = [_chunkTOFO2EMHcjs.source.call(void 0, { source: "internal" })], _concat_dec = [_chunkTOFO2EMHcjs.source.call(void 0, { source: "internal" })];
178
+ _from_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _random_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _range_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _empty_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _repeat_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _generate_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })], _concat_dec = [_chunkVJAICXA6cjs.source.call(void 0, { source: "internal" })];
179
179
  var _Tyneq = class _Tyneq {
180
180
  static from(source2) {
181
- _chunk6QXGRDROcjs.ArgumentUtility.checkNotOptional({ source: source2 });
182
- _chunk6QXGRDROcjs.ArgumentUtility.checkIterable({ source: source2 });
181
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ source: source2 });
182
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkIterable({ source: source2 });
183
183
  const sourceKind = _Tyneq.resolveSourceKind(source2);
184
184
  const adapter = new EnumerableAdapter(source2);
185
- return new (0, _chunkTOFO2EMHcjs.TyneqEnumerable)(adapter, new (0, _chunkTOFO2EMHcjs.QueryNode)("from", [source2], null, "source", sourceKind));
185
+ return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)(adapter, new (0, _chunkVJAICXA6cjs.QueryNode)("from", [source2], null, "source", sourceKind));
186
186
  }
187
187
  static resolveSourceKind(source2) {
188
188
  if (Array.isArray(source2)) return "array";
@@ -192,12 +192,12 @@ var _Tyneq = class _Tyneq {
192
192
  return "other";
193
193
  }
194
194
  static random(count, randomizer) {
195
- _chunk6QXGRDROcjs.ArgumentUtility.checkNonNegative({ count });
196
- _chunk6QXGRDROcjs.ArgumentUtility.checkInteger({ count });
197
- _chunk6QXGRDROcjs.ArgumentUtility.checkNotOptional({ randomizer });
198
- return new (0, _chunkTOFO2EMHcjs.TyneqEnumerable)({
195
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkNonNegative({ count });
196
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkInteger({ count });
197
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ randomizer });
198
+ return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)({
199
199
  getEnumerator: () => new RandomEnumerator(count, randomizer)
200
- }, new (0, _chunkTOFO2EMHcjs.QueryNode)("random", [count, randomizer], null, "source"));
200
+ }, new (0, _chunkVJAICXA6cjs.QueryNode)("random", [count, randomizer], null, "source"));
201
201
  }
202
202
  /**
203
203
  * Returns `true` if `source` is `null`, `undefined`, or an iterable whose first element is `null` or `undefined`.
@@ -209,44 +209,44 @@ var _Tyneq = class _Tyneq {
209
209
  return this.from(source2).isNullOrEmpty();
210
210
  }
211
211
  static range(start, count) {
212
- _chunk6QXGRDROcjs.ArgumentUtility.checkNonNegative({ count });
213
- _chunk6QXGRDROcjs.ArgumentUtility.checkInteger({ count });
212
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkNonNegative({ count });
213
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkInteger({ count });
214
214
  const end = start + count - 1;
215
- return new (0, _chunkTOFO2EMHcjs.TyneqEnumerable)({
215
+ return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)({
216
216
  getEnumerator: () => new RangeEnumerator(start, end)
217
- }, new (0, _chunkTOFO2EMHcjs.QueryNode)("range", [start, count], null, "source"));
217
+ }, new (0, _chunkVJAICXA6cjs.QueryNode)("range", [start, count], null, "source"));
218
218
  }
219
219
  static empty() {
220
- return new (0, _chunkTOFO2EMHcjs.TyneqEnumerable)(
220
+ return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)(
221
221
  new EnumerableAdapter([]),
222
- new (0, _chunkTOFO2EMHcjs.QueryNode)("empty", [], null, "source")
222
+ new (0, _chunkVJAICXA6cjs.QueryNode)("empty", [], null, "source")
223
223
  );
224
224
  }
225
225
  static repeat(value, count) {
226
- _chunk6QXGRDROcjs.ArgumentUtility.checkNonNegative({ count });
227
- _chunk6QXGRDROcjs.ArgumentUtility.checkInteger({ count });
228
- return new (0, _chunkTOFO2EMHcjs.TyneqEnumerable)({
226
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkNonNegative({ count });
227
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkInteger({ count });
228
+ return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)({
229
229
  getEnumerator: () => new RepeatEnumerator(value, count)
230
- }, new (0, _chunkTOFO2EMHcjs.QueryNode)("repeat", [value, count], null, "source"));
230
+ }, new (0, _chunkVJAICXA6cjs.QueryNode)("repeat", [value, count], null, "source"));
231
231
  }
232
232
  static generate(seed, next, count) {
233
- _chunk6QXGRDROcjs.ArgumentUtility.checkNotOptional({ next });
233
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ next });
234
234
  if (count !== void 0) {
235
- _chunk6QXGRDROcjs.ArgumentUtility.checkNonNegative({ count });
236
- _chunk6QXGRDROcjs.ArgumentUtility.checkInteger({ count });
235
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkNonNegative({ count });
236
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkInteger({ count });
237
237
  }
238
- return new (0, _chunkTOFO2EMHcjs.TyneqEnumerable)({
238
+ return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)({
239
239
  getEnumerator: () => new GenerateEnumerator(seed, next, count)
240
- }, new (0, _chunkTOFO2EMHcjs.QueryNode)("generate", [seed, next, count], null, "source"));
240
+ }, new (0, _chunkVJAICXA6cjs.QueryNode)("generate", [seed, next, count], null, "source"));
241
241
  }
242
242
  static concat(...sources) {
243
243
  for (const source2 of sources) {
244
- _chunk6QXGRDROcjs.ArgumentUtility.checkNotOptional({ source: source2 });
245
- _chunk6QXGRDROcjs.ArgumentUtility.checkIterable({ source: source2 });
244
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ source: source2 });
245
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkIterable({ source: source2 });
246
246
  }
247
- return new (0, _chunkTOFO2EMHcjs.TyneqEnumerable)({
247
+ return new (0, _chunkVJAICXA6cjs.TyneqEnumerable)({
248
248
  getEnumerator: () => new SourceConcatEnumerator(...sources)
249
- }, new (0, _chunkTOFO2EMHcjs.QueryNode)("concat", sources, null, "source"));
249
+ }, new (0, _chunkVJAICXA6cjs.QueryNode)("concat", sources, null, "source"));
250
250
  }
251
251
  /**
252
252
  * Pairs each element with its zero-based index.
@@ -264,8 +264,8 @@ var _Tyneq = class _Tyneq {
264
264
  * @throws {ArgumentTypeError} When `source` is not iterable.
265
265
  */
266
266
  static enumerate(source2) {
267
- _chunk6QXGRDROcjs.ArgumentUtility.checkNotOptional({ source: source2 });
268
- _chunk6QXGRDROcjs.ArgumentUtility.checkIterable({ source: source2 });
267
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkNotOptional({ source: source2 });
268
+ _chunkOWKUE3ACcjs.ArgumentUtility.checkIterable({ source: source2 });
269
269
  return this.from({
270
270
  *[Symbol.iterator]() {
271
271
  let index = 0;
@@ -274,34 +274,34 @@ var _Tyneq = class _Tyneq {
274
274
  });
275
275
  }
276
276
  };
277
- _init = _chunk6QXGRDROcjs.__decoratorStart.call(void 0, null);
278
- _chunk6QXGRDROcjs.__decorateElement.call(void 0, _init, 9, "from", _from_dec, _Tyneq);
279
- _chunk6QXGRDROcjs.__decorateElement.call(void 0, _init, 9, "random", _random_dec, _Tyneq);
280
- _chunk6QXGRDROcjs.__decorateElement.call(void 0, _init, 9, "range", _range_dec, _Tyneq);
281
- _chunk6QXGRDROcjs.__decorateElement.call(void 0, _init, 9, "empty", _empty_dec, _Tyneq);
282
- _chunk6QXGRDROcjs.__decorateElement.call(void 0, _init, 9, "repeat", _repeat_dec, _Tyneq);
283
- _chunk6QXGRDROcjs.__decorateElement.call(void 0, _init, 9, "generate", _generate_dec, _Tyneq);
284
- _chunk6QXGRDROcjs.__decorateElement.call(void 0, _init, 9, "concat", _concat_dec, _Tyneq);
285
- _chunk6QXGRDROcjs.__decoratorMetadata.call(void 0, _init, _Tyneq);
286
- _chunk6QXGRDROcjs.__runInitializers.call(void 0, _init, 3, _Tyneq);
277
+ _init = _chunkOWKUE3ACcjs.__decoratorStart.call(void 0, null);
278
+ _chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "from", _from_dec, _Tyneq);
279
+ _chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "random", _random_dec, _Tyneq);
280
+ _chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "range", _range_dec, _Tyneq);
281
+ _chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "empty", _empty_dec, _Tyneq);
282
+ _chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "repeat", _repeat_dec, _Tyneq);
283
+ _chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "generate", _generate_dec, _Tyneq);
284
+ _chunkOWKUE3ACcjs.__decorateElement.call(void 0, _init, 9, "concat", _concat_dec, _Tyneq);
285
+ _chunkOWKUE3ACcjs.__decoratorMetadata.call(void 0, _init, _Tyneq);
286
+ _chunkOWKUE3ACcjs.__runInitializers.call(void 0, _init, 3, _Tyneq);
287
287
  var Tyneq = _Tyneq;
288
288
 
289
289
  // src/core/errors/KeyNotFoundError.ts
290
- var KeyNotFoundError = class extends _chunk6QXGRDROcjs.TyneqError {
290
+ var KeyNotFoundError = class extends _chunkOWKUE3ACcjs.TyneqError {
291
291
  constructor(message = "The given key was not present in the dictionary.", inner) {
292
292
  super(message, { inner });
293
293
  }
294
294
  };
295
295
 
296
296
  // src/core/errors/NotSupportedError.ts
297
- var NotSupportedError = class extends _chunk6QXGRDROcjs.TyneqError {
297
+ var NotSupportedError = class extends _chunkOWKUE3ACcjs.TyneqError {
298
298
  constructor(message = "The requested operation is not supported.", inner) {
299
299
  super(message, { inner });
300
300
  }
301
301
  };
302
302
 
303
303
  // src/core/errors/CompilerError.ts
304
- var CompilerError = class extends _chunk6QXGRDROcjs.TyneqError {
304
+ var CompilerError = class extends _chunkOWKUE3ACcjs.TyneqError {
305
305
  constructor(message, phase, operatorName, inner) {
306
306
  super(message, { inner });
307
307
  this.phase = phase;
@@ -443,7 +443,7 @@ var QueryPlanTransformer = class {
443
443
  * @param source - The transformed predecessor, or `null` for source nodes.
444
444
  */
445
445
  transformNode(node, source2) {
446
- return new (0, _chunkTOFO2EMHcjs.QueryNode)(node.operatorName, node.args, source2, node.category, node.sourceKind);
446
+ return new (0, _chunkVJAICXA6cjs.QueryNode)(node.operatorName, node.args, source2, node.category, node.sourceKind);
447
447
  }
448
448
  };
449
449
 
@@ -465,7 +465,7 @@ var QueryPlanOptimizer = class extends QueryPlanTransformer {
465
465
  const predA = source2.args[0];
466
466
  const predB = node.args[0];
467
467
  const fused = (x) => predA(x) && predB(x);
468
- return new (0, _chunkTOFO2EMHcjs.QueryNode)("where", [fused], source2.source, "streaming");
468
+ return new (0, _chunkVJAICXA6cjs.QueryNode)("where", [fused], source2.source, "streaming");
469
469
  }
470
470
  /**
471
471
  * @remarks Fusion is only semantics-preserving for pure, side-effect-free projections.
@@ -474,7 +474,7 @@ var QueryPlanOptimizer = class extends QueryPlanTransformer {
474
474
  const projA = source2.args[0];
475
475
  const projB = node.args[0];
476
476
  const fused = (x) => projB(projA(x));
477
- return new (0, _chunkTOFO2EMHcjs.QueryNode)("select", [fused], source2.source, "streaming");
477
+ return new (0, _chunkVJAICXA6cjs.QueryNode)("select", [fused], source2.source, "streaming");
478
478
  }
479
479
  };
480
480
 
@@ -559,7 +559,7 @@ var QueryPlanCompiler = class {
559
559
  return this.applyOperator(this.compileNode(node.source, options), node);
560
560
  }
561
561
  compileSource(node, options) {
562
- const entry = _chunkTOFO2EMHcjs.OperatorRegistry.getSource(node.operatorName);
562
+ const entry = _chunkVJAICXA6cjs.OperatorRegistry.getSource(node.operatorName);
563
563
  if (!entry) {
564
564
  throw new CompilerError(
565
565
  `Unknown source operator "${node.operatorName}". Register it via OperatorRegistry.registerSource() before compiling.`,
@@ -575,7 +575,7 @@ var QueryPlanCompiler = class {
575
575
  const entry = this.findOperatorEntry(node.operatorName, source2);
576
576
  if (!entry) {
577
577
  const sourceType = source2 !== null && source2 !== void 0 ? (_c = (_b = (_a = Object.getPrototypeOf(source2)) == null ? void 0 : _a.constructor) == null ? void 0 : _b.name) != null ? _c : typeof source2 : "null";
578
- const knownForAnyTarget = _chunkTOFO2EMHcjs.OperatorRegistry.hasOperator(node.operatorName);
578
+ const knownForAnyTarget = _chunkVJAICXA6cjs.OperatorRegistry.hasOperator(node.operatorName);
579
579
  const message = knownForAnyTarget ? `Operator "${node.operatorName}" is not registered for sequence type ${sourceType}. Ensure the source sequence is of the correct type for this operator.` : `Operator "${node.operatorName}" is not registered. Register it via @operator, createOperator, or createGeneratorOperator before compiling.`;
580
580
  throw new CompilerError(message, "operator", node.operatorName);
581
581
  }
@@ -590,7 +590,7 @@ var QueryPlanCompiler = class {
590
590
  while (proto !== null) {
591
591
  const ctor = proto.constructor;
592
592
  if (ctor !== void 0) {
593
- const entry = _chunkTOFO2EMHcjs.OperatorRegistry.getOperator(operatorName, ctor);
593
+ const entry = _chunkVJAICXA6cjs.OperatorRegistry.getOperator(operatorName, ctor);
594
594
  if (entry !== void 0) {
595
595
  return entry;
596
596
  }
@@ -655,5 +655,4 @@ var QueryPlanCompiler = class {
655
655
 
656
656
 
657
657
 
658
- exports.ArgumentError = _chunk6QXGRDROcjs.ArgumentError; exports.ArgumentNullError = _chunk6QXGRDROcjs.ArgumentNullError; exports.ArgumentOutOfRangeError = _chunk6QXGRDROcjs.ArgumentOutOfRangeError; exports.ArgumentTypeError = _chunk6QXGRDROcjs.ArgumentTypeError; exports.ArgumentUtility = _chunk6QXGRDROcjs.ArgumentUtility; exports.CompilerError = CompilerError; exports.InvalidOperationError = _chunkTOFO2EMHcjs.InvalidOperationError; exports.KeyNotFoundError = KeyNotFoundError; exports.Lazy = _chunk6QXGRDROcjs.Lazy; exports.NotSupportedError = NotSupportedError; exports.OperatorMetadata = _chunkTOFO2EMHcjs.OperatorMetadata; exports.OperatorRegistry = _chunkTOFO2EMHcjs.OperatorRegistry; exports.PluginError = _chunkTOFO2EMHcjs.PluginError; exports.QueryNode = _chunkTOFO2EMHcjs.QueryNode; exports.QueryPlanCompiler = QueryPlanCompiler; exports.QueryPlanOptimizer = QueryPlanOptimizer; exports.QueryPlanPrinter = QueryPlanPrinter; exports.QueryPlanTransformer = QueryPlanTransformer; exports.QueryPlanWalker = QueryPlanWalker; exports.ReflectionContext = _chunk6QXGRDROcjs.ReflectionContext; exports.ReflectionError = _chunk6QXGRDROcjs.ReflectionError; exports.RegistryError = _chunkTOFO2EMHcjs.RegistryError; exports.SequenceContainsNoElementsError = _chunkTOFO2EMHcjs.SequenceContainsNoElementsError; exports.Tyneq = Tyneq; exports.TyneqBaseEnumerator = _chunkTOFO2EMHcjs.TyneqBaseEnumerator; exports.TyneqCachedEnumerable = _chunkTOFO2EMHcjs.TyneqCachedEnumerable; exports.TyneqCachedEnumerator = _chunkTOFO2EMHcjs.TyneqCachedEnumerator; exports.TyneqCachedTerminalOperator = _chunkTOFO2EMHcjs.TyneqCachedTerminalOperator; exports.TyneqComparer = _chunkTOFO2EMHcjs.TyneqComparer; exports.TyneqEnumerator = _chunkTOFO2EMHcjs.TyneqEnumerator; exports.TyneqError = _chunk6QXGRDROcjs.TyneqError; exports.TyneqOrderedEnumerable = _chunkTOFO2EMHcjs.TyneqOrderedEnumerable; exports.TyneqOrderedEnumerator = _chunkTOFO2EMHcjs.TyneqOrderedEnumerator; exports.TyneqOrderedTerminalOperator = _chunkTOFO2EMHcjs.TyneqOrderedTerminalOperator; exports.TyneqTerminalOperator = _chunkTOFO2EMHcjs.TyneqTerminalOperator; exports.TypeGuardUtility = _chunk6QXGRDROcjs.TypeGuardUtility; exports.ValidationBuilder = _chunkD2KVCXTFcjs.ValidationBuilder; exports.ValidationError = _chunkD2KVCXTFcjs.ValidationError; exports.cachedOperator = _chunkTOFO2EMHcjs.cachedOperator; exports.cachedTerminal = _chunkTOFO2EMHcjs.cachedTerminal; exports.createCachedOperator = _chunkTOFO2EMHcjs.createCachedOperator; exports.createCachedTerminalOperator = _chunkTOFO2EMHcjs.createCachedTerminalOperator; exports.createGeneratorOperator = _chunkTOFO2EMHcjs.createGeneratorOperator; exports.createOperator = _chunkTOFO2EMHcjs.createOperator; exports.createOrderedOperator = _chunkTOFO2EMHcjs.createOrderedOperator; exports.createOrderedTerminalOperator = _chunkTOFO2EMHcjs.createOrderedTerminalOperator; exports.createTerminalOperator = _chunkTOFO2EMHcjs.createTerminalOperator; exports.isSourceNode = _chunkTOFO2EMHcjs.isSourceNode; exports.operator = _chunkTOFO2EMHcjs.operator; exports.orderedOperator = _chunkTOFO2EMHcjs.orderedOperator; exports.orderedTerminal = _chunkTOFO2EMHcjs.orderedTerminal; exports.reflect = _chunk6QXGRDROcjs.reflect; exports.terminal = _chunkTOFO2EMHcjs.terminal; exports.tyneqQueryNode = _chunkTOFO2EMHcjs.tyneqQueryNode;
659
- //# sourceMappingURL=index.cjs.map
658
+ exports.ArgumentError = _chunkOWKUE3ACcjs.ArgumentError; exports.ArgumentNullError = _chunkOWKUE3ACcjs.ArgumentNullError; exports.ArgumentOutOfRangeError = _chunkOWKUE3ACcjs.ArgumentOutOfRangeError; exports.ArgumentTypeError = _chunkOWKUE3ACcjs.ArgumentTypeError; exports.ArgumentUtility = _chunkOWKUE3ACcjs.ArgumentUtility; exports.CompilerError = CompilerError; exports.InvalidOperationError = _chunkVJAICXA6cjs.InvalidOperationError; exports.KeyNotFoundError = KeyNotFoundError; exports.Lazy = _chunkOWKUE3ACcjs.Lazy; exports.NotSupportedError = NotSupportedError; exports.OperatorMetadata = _chunkVJAICXA6cjs.OperatorMetadata; exports.OperatorRegistry = _chunkVJAICXA6cjs.OperatorRegistry; exports.PluginError = _chunkVJAICXA6cjs.PluginError; exports.QueryNode = _chunkVJAICXA6cjs.QueryNode; exports.QueryPlanCompiler = QueryPlanCompiler; exports.QueryPlanOptimizer = QueryPlanOptimizer; exports.QueryPlanPrinter = QueryPlanPrinter; exports.QueryPlanTransformer = QueryPlanTransformer; exports.QueryPlanWalker = QueryPlanWalker; exports.ReflectionContext = _chunkOWKUE3ACcjs.ReflectionContext; exports.ReflectionError = _chunkOWKUE3ACcjs.ReflectionError; exports.RegistryError = _chunkVJAICXA6cjs.RegistryError; exports.SequenceContainsNoElementsError = _chunkVJAICXA6cjs.SequenceContainsNoElementsError; exports.Tyneq = Tyneq; exports.TyneqBaseEnumerator = _chunkVJAICXA6cjs.TyneqBaseEnumerator; exports.TyneqCachedEnumerable = _chunkVJAICXA6cjs.TyneqCachedEnumerable; exports.TyneqCachedEnumerator = _chunkVJAICXA6cjs.TyneqCachedEnumerator; exports.TyneqCachedTerminalOperator = _chunkVJAICXA6cjs.TyneqCachedTerminalOperator; exports.TyneqComparer = _chunkVJAICXA6cjs.TyneqComparer; exports.TyneqEnumerator = _chunkVJAICXA6cjs.TyneqEnumerator; exports.TyneqError = _chunkOWKUE3ACcjs.TyneqError; exports.TyneqOrderedEnumerable = _chunkVJAICXA6cjs.TyneqOrderedEnumerable; exports.TyneqOrderedEnumerator = _chunkVJAICXA6cjs.TyneqOrderedEnumerator; exports.TyneqOrderedTerminalOperator = _chunkVJAICXA6cjs.TyneqOrderedTerminalOperator; exports.TyneqTerminalOperator = _chunkVJAICXA6cjs.TyneqTerminalOperator; exports.TypeGuardUtility = _chunkOWKUE3ACcjs.TypeGuardUtility; exports.ValidationBuilder = _chunkC5PBY3ZUcjs.ValidationBuilder; exports.ValidationError = _chunkC5PBY3ZUcjs.ValidationError; exports.cachedOperator = _chunkVJAICXA6cjs.cachedOperator; exports.cachedTerminal = _chunkVJAICXA6cjs.cachedTerminal; exports.createCachedOperator = _chunkVJAICXA6cjs.createCachedOperator; exports.createCachedTerminalOperator = _chunkVJAICXA6cjs.createCachedTerminalOperator; exports.createGeneratorOperator = _chunkVJAICXA6cjs.createGeneratorOperator; exports.createOperator = _chunkVJAICXA6cjs.createOperator; exports.createOrderedOperator = _chunkVJAICXA6cjs.createOrderedOperator; exports.createOrderedTerminalOperator = _chunkVJAICXA6cjs.createOrderedTerminalOperator; exports.createTerminalOperator = _chunkVJAICXA6cjs.createTerminalOperator; exports.isSourceNode = _chunkVJAICXA6cjs.isSourceNode; exports.operator = _chunkVJAICXA6cjs.operator; exports.orderedOperator = _chunkVJAICXA6cjs.orderedOperator; exports.orderedTerminal = _chunkVJAICXA6cjs.orderedTerminal; exports.reflect = _chunkOWKUE3ACcjs.reflect; exports.terminal = _chunkVJAICXA6cjs.terminal; exports.tyneqQueryNode = _chunkVJAICXA6cjs.tyneqQueryNode;
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { T as TyneqSequence, a as Optional, I as ItemSelector, C as Comparer, M as Maybe, b as OperatorMetadata, c as OperatorEntry, S as SequenceConstructor, O as OperatorSource, Q as QueryPlanVisitor, d as QueryPlanPrinterOptions, e as QueryPlanNode, f as QueryPlanWalkerOptions, N as Nullable } from './core-DR17XN89.cjs';
2
- export { A as Action, g as Assume, B as BoundMethod, h as CacheResult, i as CachedEnumerable, j as Cast, k as Constructor, l as Enumerable, E as Enumerator, m as EnumeratorFactory, n as EqualityComparer, F as Factory, o as FieldKeys, p as Func, G as GenericFunction, H as HasLength, q as InstanceOf, r as ItemAction, s as ItemPredicate, t as IteratorFactory, K as KeyValuePair, u as Method, v as MethodKeys, w as MinMaxResult, x as NoInfer, y as OperatorCategory, z as OperatorKind, D as OrderedEnumerable, P as Predicate, J as QueryNode, L as QueryPlanTraversalDirection, R as SequenceFactory, U as SourceKind, V as TyneqCachedSequence, W as TyneqEnumerableFactory, X as TyneqOrderedSequence, Y as WithProperties, Z as isSourceNode, _ as tyneqQueryNode } from './core-DR17XN89.cjs';
1
+ import { T as TyneqSequence, a as Optional, I as ItemSelector, C as Comparer, M as Maybe, b as OperatorMetadata, Q as QueryPlanVisitor, c as QueryPlanPrinterOptions, d as QueryPlanNode, e as QueryPlanWalkerOptions, N as Nullable } from './core-C54TSmgW.cjs';
2
+ export { A as Action, f as Assume, B as BoundMethod, g as CacheResult, h as CachedEnumerable, i as Cast, j as Constructor, k as Enumerable, E as Enumerator, l as EnumeratorFactory, m as EqualityComparer, F as Factory, n as FieldKeys, o as Func, G as GenericFunction, H as HasLength, p as InstanceOf, q as ItemAction, r as ItemPredicate, s as IteratorFactory, K as KeyValuePair, t as Method, u as MethodKeys, v as MinMaxResult, w as NoInfer, x as OperatorCategory, y as OperatorEntry, z as OperatorKind, O as OperatorSource, D as OrderedEnumerable, P as Predicate, J as QueryNode, L as QueryPlanTraversalDirection, S as SequenceConstructor, R as SequenceFactory, U as SourceKind, V as TyneqCachedSequence, W as TyneqEnumerableFactory, X as TyneqOrderedSequence, Y as WithProperties, Z as isSourceNode, _ as tyneqQueryNode } from './core-C54TSmgW.cjs';
3
3
  export { AccessorDescriptor, ArgumentUtility, DataDescriptor, Lazy, MemberDescriptor, MethodDescriptor, ReflectOptions, ReflectionContext, TypeGuardUtility, ValidationBuilder, reflect } from './utility/index.cjs';
4
- export { T as TyneqBaseEnumerator, s as TyneqCachedEnumerable, a as TyneqCachedEnumerator, b as TyneqCachedTerminalOperator, c as TyneqEnumerator, u as TyneqOrderedEnumerable, d as TyneqOrderedEnumerator, e as TyneqOrderedTerminalOperator, f as TyneqTerminalOperator, g as cachedOperator, h as cachedTerminal, i as createCachedOperator, j as createCachedTerminalOperator, k as createGeneratorOperator, l as createOperator, m as createOrderedOperator, n as createOrderedTerminalOperator, o as createTerminalOperator, p as operator, q as orderedOperator, r as orderedTerminal, t as terminal } from './TyneqCachedTerminalOperator-QzqAHJSE.cjs';
4
+ export { O as OperatorRegistry, T as TyneqBaseEnumerator, s as TyneqCachedEnumerable, a as TyneqCachedEnumerator, b as TyneqCachedTerminalOperator, c as TyneqEnumerator, u as TyneqOrderedEnumerable, d as TyneqOrderedEnumerator, e as TyneqOrderedTerminalOperator, f as TyneqTerminalOperator, g as cachedOperator, h as cachedTerminal, i as createCachedOperator, j as createCachedTerminalOperator, k as createGeneratorOperator, l as createOperator, m as createOrderedOperator, n as createOrderedTerminalOperator, o as createTerminalOperator, p as operator, q as orderedOperator, r as orderedTerminal, t as terminal } from './TyneqCachedTerminalOperator-EaNiNt61.cjs';
5
5
 
6
6
  /**
7
7
  * Entry point for creating Tyneq sequences.
@@ -507,184 +507,6 @@ declare class ReflectionError extends TyneqError {
507
507
  constructor(message: string, methodName: string, prototypeName?: string, inner?: Error);
508
508
  }
509
509
 
510
- /**
511
- * Central registry for all Tyneq operators.
512
- *
513
- * Every registration path - `@operator`, `@terminal`, `createOperator`,
514
- * `createGeneratorOperator`, `createTerminalOperator` - flows through this class.
515
- * It is the single source of truth for which operators exist, their kind, and their
516
- * prototype-level implementation.
517
- *
518
- * Internally the registry maintains two separate namespaces:
519
- * - Source factories (`Tyneq.from`, `Tyneq.range`, etc.) - keyed by name alone.
520
- * - Instance operators (`.where`, `.select`, etc.) - keyed by (name, targetClass).
521
- *
522
- * This means a source factory and an instance method can share a name without
523
- * conflict (e.g. `Tyneq.concat` and `seq.concat`), and two instance operators
524
- * with the same name on different prototype chains (e.g. `ordered.foo` and
525
- * `cached.foo`) also coexist without conflict.
526
- *
527
- * @example
528
- * ```ts
529
- * import { OperatorRegistry } from "tyneq/plugin";
530
- *
531
- * OperatorRegistry.has("where"); // -> true
532
- * OperatorRegistry.list(); // -> OperatorMetadata[]
533
- * ```
534
- *
535
- * @group Classes
536
- */
537
- declare class OperatorRegistry {
538
- private static readonly _sources;
539
- private static readonly _operators;
540
- private static readonly _registrationHooks;
541
- private static readonly _registrationGuards;
542
- /**
543
- * Registers an operator entry and patches the method onto `entry.metadata.targetClass.prototype`.
544
- *
545
- * @throws {RegistryError} When an operator with the same name is already registered on the same targetClass.
546
- */
547
- static register(input: OperatorEntry): void;
548
- /**
549
- * Removes an operator registration and deletes the prototype method for external operators.
550
- *
551
- * Checks the instance operator namespace first, then the source namespace.
552
- *
553
- * @returns `true` if the operator was found and removed; `false` if no operator with that name existed.
554
- * @remarks
555
- * Internal operators (source `"internal"`) are not removed from the prototype - only
556
- * their registry entry is deleted.
557
- *
558
- * For targeted removal use {@link unregisterOperator} or {@link unregisterSource}.
559
- */
560
- static unregister(name: string): boolean;
561
- /**
562
- * Removes a specific instance operator registration for a given (name, targetClass) pair
563
- * and deletes the prototype method for external operators.
564
- *
565
- * @returns `true` if the entry was found and removed; `false` otherwise.
566
- */
567
- static unregisterOperator(name: string, targetClass: SequenceConstructor): boolean;
568
- /**
569
- * Removes a source factory registration.
570
- *
571
- * @returns `true` if the source was found and removed; `false` otherwise.
572
- */
573
- static unregisterSource(name: string): boolean;
574
- /**
575
- * Registers a hook called after every successful operator registration (both namespaces).
576
- *
577
- * @returns A function that removes the hook when called.
578
- */
579
- static onRegister(hook: (entry: OperatorEntry) => void): () => void;
580
- /**
581
- * Registers a guard called before every registration (both namespaces).
582
- * Throw from the guard to reject the registration.
583
- *
584
- * @returns A function that removes the guard when called.
585
- */
586
- static addGuard(guard: (entry: OperatorEntry) => void): () => void;
587
- /**
588
- * Returns `true` if a name exists in either the source or instance operator namespace.
589
- * Use {@link hasSource} or {@link hasOperator} for namespace-specific checks.
590
- */
591
- static has(name: string): boolean;
592
- /**
593
- * Returns `true` if a source factory with `name` is registered.
594
- */
595
- static hasSource(name: string): boolean;
596
- /**
597
- * Returns `true` if an instance operator with `name` is registered.
598
- * When `targetClass` is provided, checks only that specific (name, targetClass) pair.
599
- * When omitted, returns `true` if any target has an operator with that name.
600
- */
601
- static hasOperator(name: string, targetClass?: SequenceConstructor): boolean;
602
- /**
603
- * Returns the operator entry for `name` from either namespace, or `undefined` if not found.
604
- * Checks the instance operator namespace first, then the source namespace.
605
- * For namespace-specific retrieval use {@link getSource} or {@link getOperator}.
606
- */
607
- static get(name: string): Maybe<OperatorEntry>;
608
- /**
609
- * Returns the source factory entry for `name`, or `undefined` if not registered.
610
- */
611
- static getSource(name: string): Maybe<OperatorEntry>;
612
- /**
613
- * Returns the instance operator entry for `name` on `targetClass`, or `undefined`.
614
- * When `targetClass` is omitted, returns the first entry found across all targets.
615
- */
616
- static getOperator(name: string, targetClass?: SequenceConstructor): Maybe<OperatorEntry>;
617
- /**
618
- * Returns the metadata for `name` from either namespace, or `undefined` if not found.
619
- * Checks instance operators first, then sources.
620
- */
621
- static getMetadata(name: string): Maybe<OperatorMetadata>;
622
- /**
623
- * Returns metadata for all registered operators and source factories.
624
- * Use {@link listOperators} or {@link listSources} for namespace-specific lists.
625
- */
626
- static list(): readonly OperatorMetadata[];
627
- /**
628
- * Returns metadata for all registered source factories.
629
- */
630
- static listSources(): readonly OperatorMetadata[];
631
- /**
632
- * Returns metadata for all registered instance operators.
633
- * When `targetClass` is provided, returns only entries for that specific target class.
634
- */
635
- static listOperators(targetClass?: SequenceConstructor): readonly OperatorMetadata[];
636
- /** Returns metadata for all operators of `kind` across both namespaces. */
637
- static listByKind(kind: OperatorMetadata["kind"]): readonly OperatorMetadata[];
638
- /** Returns metadata for all operators from `source` across both namespaces. */
639
- static listBySource(source: OperatorMetadata["source"]): readonly OperatorMetadata[];
640
- /** Returns the total number of registered operators across both namespaces. */
641
- static count(): number;
642
- /**
643
- * Registers a source operator (a static factory, not a prototype method).
644
- *
645
- * @remarks
646
- * Source operators differ from prototype operators in two ways:
647
- * - They are called with `null` as `this` - they have no instance.
648
- * - They are looked up by the compiler via {@link getSource} rather than
649
- * being patched onto a prototype.
650
- *
651
- * The entry is stored in the source namespace and is never patched onto any prototype.
652
- * Registration guards run for `"external"` sources (same policy as {@link register}).
653
- * Guards are skipped for `"internal"` sources (same policy used for internal builtins).
654
- *
655
- * Third-party source operators registered here are automatically compiled by
656
- * `QueryPlanCompiler` without any changes to the compiler.
657
- *
658
- * @param name - The operator name, matching the `operatorName` on the `QueryPlanNode`.
659
- * @param factory - The factory function; receives the node args in order, `this` is `null`.
660
- * @param source - Whether this is a built-in or external source operator. Defaults to `"external"`.
661
- *
662
- * @example
663
- * ```ts
664
- * import { OperatorRegistry } from "tyneq/plugin";
665
- * import { Tyneq } from "tyneq";
666
- *
667
- * OperatorRegistry.registerSource("fibonacci", (count) => {
668
- * // return a Tyneq sequence of fibonacci numbers
669
- * });
670
- * ```
671
- *
672
- * @group Classes
673
- */
674
- static registerSource(name: string, factory: (...args: unknown[]) => unknown, source?: OperatorSource): void;
675
- /**
676
- * Records a built-in operator in the instance operator namespace without patching the prototype.
677
- * Built-in operators already live as direct methods on their target class.
678
- *
679
- * @remarks
680
- * Registration guards are intentionally skipped - builtins are internal and
681
- * trusted; guards exist to validate external plugin registrations only.
682
- *
683
- * @internal
684
- */
685
- static registerBuiltin(name: string, kind: OperatorMetadata["kind"], targetClass: SequenceConstructor): void;
686
- }
687
-
688
510
  /**
689
511
  * Converts a query plan tree into a human-readable multi-line string.
690
512
  *
@@ -1013,4 +835,4 @@ declare class QueryPlanCompiler {
1013
835
  private findOperatorEntry;
1014
836
  }
1015
837
 
1016
- export { ArgumentError, ArgumentNullError, ArgumentOutOfRangeError, ArgumentTypeError, Comparer, type CompileOptions, CompilerError, QueryPlanNode as IQueryNode, InvalidOperationError, ItemSelector, KeyNotFoundError, Maybe, NotSupportedError, Nullable, OperatorEntry, OperatorMetadata, OperatorRegistry, OperatorSource, Optional, PluginError, QueryPlanCompiler, QueryPlanOptimizer, QueryPlanPrinter, QueryPlanPrinterOptions, QueryPlanTransformer, QueryPlanVisitor, QueryPlanWalker, QueryPlanWalkerOptions, ReflectionError, RegistryError, SequenceConstructor, SequenceContainsNoElementsError, Tyneq, TyneqComparer, TyneqError, TyneqSequence, ValidationError };
838
+ export { ArgumentError, ArgumentNullError, ArgumentOutOfRangeError, ArgumentTypeError, Comparer, type CompileOptions, CompilerError, QueryPlanNode as IQueryNode, InvalidOperationError, ItemSelector, KeyNotFoundError, Maybe, NotSupportedError, Nullable, OperatorMetadata, Optional, PluginError, QueryPlanCompiler, QueryPlanOptimizer, QueryPlanPrinter, QueryPlanPrinterOptions, QueryPlanTransformer, QueryPlanVisitor, QueryPlanWalker, QueryPlanWalkerOptions, ReflectionError, RegistryError, SequenceContainsNoElementsError, Tyneq, TyneqComparer, TyneqError, TyneqSequence, ValidationError };