linqx 0.2.0 → 0.3.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 (144) hide show
  1. package/README.md +181 -87
  2. package/dist/core/dictionary.d.ts +14 -0
  3. package/dist/core/enumerable.d.ts +9 -0
  4. package/dist/core/enumerator.d.ts +10 -0
  5. package/dist/core/grouping.d.ts +11 -0
  6. package/dist/core/lookup.d.ts +12 -0
  7. package/dist/core/memoized-enumerable.d.ts +12 -0
  8. package/dist/core/ordered-enumerable.d.ts +14 -0
  9. package/dist/core/shared-enumerable.d.ts +10 -0
  10. package/dist/extensions.d.ts +18 -0
  11. package/dist/extensions.js +13 -0
  12. package/dist/factories/choice.d.ts +8 -0
  13. package/dist/factories/cycle.d.ts +8 -0
  14. package/dist/factories/defer.d.ts +8 -0
  15. package/dist/factories/empty.d.ts +3 -0
  16. package/dist/factories/from.d.ts +46 -0
  17. package/dist/factories/generate.d.ts +9 -0
  18. package/dist/factories/make.d.ts +8 -0
  19. package/dist/factories/matches.d.ts +14 -0
  20. package/dist/factories/range-down.d.ts +10 -0
  21. package/dist/factories/range-to.d.ts +12 -0
  22. package/dist/factories/range.d.ts +10 -0
  23. package/dist/factories/repeat-with-finalize.d.ts +9 -0
  24. package/dist/factories/repeat.d.ts +9 -0
  25. package/dist/factories/to-infinity.d.ts +9 -0
  26. package/dist/factories/to-negative-infinity.d.ts +9 -0
  27. package/dist/factories/unfold.d.ts +9 -0
  28. package/dist/index.d.ts +87 -3
  29. package/dist/index.js +2 -4
  30. package/dist/internal/create-enumerable.d.ts +3 -0
  31. package/dist/internal/functions.d.ts +6 -0
  32. package/dist/internal/to-iterable.d.ts +2 -0
  33. package/dist/operators/aggregate-by.d.ts +2 -0
  34. package/dist/operators/aggregate.d.ts +2 -0
  35. package/dist/operators/all.d.ts +2 -0
  36. package/dist/operators/alternate.d.ts +2 -0
  37. package/dist/operators/any.d.ts +2 -0
  38. package/dist/operators/append.d.ts +2 -0
  39. package/dist/operators/as-enumerable.d.ts +2 -0
  40. package/dist/operators/average.d.ts +2 -0
  41. package/dist/operators/buffer.d.ts +2 -0
  42. package/dist/operators/cast.d.ts +2 -0
  43. package/dist/operators/catch-error.d.ts +2 -0
  44. package/dist/operators/choose.d.ts +2 -0
  45. package/dist/operators/chunk.d.ts +2 -0
  46. package/dist/operators/concat.d.ts +2 -0
  47. package/dist/operators/contains.d.ts +2 -0
  48. package/dist/operators/count-by.d.ts +2 -0
  49. package/dist/operators/count.d.ts +2 -0
  50. package/dist/operators/create-ordered-enumerable.d.ts +2 -0
  51. package/dist/operators/default-if-empty.d.ts +2 -0
  52. package/dist/operators/distinct-by.d.ts +2 -0
  53. package/dist/operators/distinct-until-changed.d.ts +2 -0
  54. package/dist/operators/distinct.d.ts +2 -0
  55. package/dist/operators/do-action.d.ts +3 -0
  56. package/dist/operators/element-at-or-default.d.ts +2 -0
  57. package/dist/operators/element-at.d.ts +2 -0
  58. package/dist/operators/except-by.d.ts +2 -0
  59. package/dist/operators/except.d.ts +2 -0
  60. package/dist/operators/finally-action.d.ts +2 -0
  61. package/dist/operators/first-or-default.d.ts +2 -0
  62. package/dist/operators/first.d.ts +2 -0
  63. package/dist/operators/flatten.d.ts +2 -0
  64. package/dist/operators/for-each.d.ts +3 -0
  65. package/dist/operators/force.d.ts +2 -0
  66. package/dist/operators/group-by.d.ts +2 -0
  67. package/dist/operators/group-join.d.ts +2 -0
  68. package/dist/operators/index-of.d.ts +2 -0
  69. package/dist/operators/index.d.ts +2 -0
  70. package/dist/operators/insert.d.ts +2 -0
  71. package/dist/operators/intersect-by.d.ts +2 -0
  72. package/dist/operators/intersect.d.ts +2 -0
  73. package/dist/operators/is-empty.d.ts +2 -0
  74. package/dist/operators/join-with.d.ts +2 -0
  75. package/dist/operators/join.d.ts +2 -0
  76. package/dist/operators/last-index-of.d.ts +2 -0
  77. package/dist/operators/last-or-default.d.ts +2 -0
  78. package/dist/operators/last.d.ts +2 -0
  79. package/dist/operators/left-join.d.ts +2 -0
  80. package/dist/operators/let-bind.d.ts +2 -0
  81. package/dist/operators/log.d.ts +2 -0
  82. package/dist/operators/map.d.ts +2 -0
  83. package/dist/operators/max-by.d.ts +2 -0
  84. package/dist/operators/max.d.ts +2 -0
  85. package/dist/operators/memoize.d.ts +2 -0
  86. package/dist/operators/merge.d.ts +2 -0
  87. package/dist/operators/min-by.d.ts +2 -0
  88. package/dist/operators/min.d.ts +2 -0
  89. package/dist/operators/of-type.d.ts +2 -0
  90. package/dist/operators/operators.d.ts +208 -0
  91. package/dist/operators/order-by-descending.d.ts +2 -0
  92. package/dist/operators/order-by.d.ts +2 -0
  93. package/dist/operators/page.d.ts +2 -0
  94. package/dist/operators/pairwise.d.ts +2 -0
  95. package/dist/operators/partition-by.d.ts +2 -0
  96. package/dist/operators/position.d.ts +2 -0
  97. package/dist/operators/prepend.d.ts +2 -0
  98. package/dist/operators/reverse.d.ts +2 -0
  99. package/dist/operators/right-join.d.ts +2 -0
  100. package/dist/operators/scan.d.ts +2 -0
  101. package/dist/operators/select-many.d.ts +2 -0
  102. package/dist/operators/select.d.ts +2 -0
  103. package/dist/operators/sequence-equal.d.ts +2 -0
  104. package/dist/operators/share.d.ts +2 -0
  105. package/dist/operators/shuffle.d.ts +2 -0
  106. package/dist/operators/single-or-default.d.ts +2 -0
  107. package/dist/operators/single.d.ts +2 -0
  108. package/dist/operators/skip-last.d.ts +2 -0
  109. package/dist/operators/skip-while.d.ts +2 -0
  110. package/dist/operators/skip.d.ts +2 -0
  111. package/dist/operators/sum.d.ts +2 -0
  112. package/dist/operators/take-except-last.d.ts +2 -0
  113. package/dist/operators/take-from-last.d.ts +2 -0
  114. package/dist/operators/take-last.d.ts +2 -0
  115. package/dist/operators/take-while.d.ts +2 -0
  116. package/dist/operators/take.d.ts +2 -0
  117. package/dist/operators/then-by-descending.d.ts +2 -0
  118. package/dist/operators/then-by.d.ts +2 -0
  119. package/dist/operators/to-array.d.ts +2 -0
  120. package/dist/operators/to-dictionary.d.ts +2 -0
  121. package/dist/operators/to-joined-string.d.ts +2 -0
  122. package/dist/operators/to-json-string.d.ts +2 -0
  123. package/dist/operators/to-lookup.d.ts +2 -0
  124. package/dist/operators/to-map.d.ts +2 -0
  125. package/dist/operators/to-object.d.ts +2 -0
  126. package/dist/operators/to-set.d.ts +2 -0
  127. package/dist/operators/trace.d.ts +2 -0
  128. package/dist/operators/traverse-breadth-first.d.ts +2 -0
  129. package/dist/operators/traverse-depth-first.d.ts +2 -0
  130. package/dist/operators/union-by.d.ts +2 -0
  131. package/dist/operators/union.d.ts +2 -0
  132. package/dist/operators/weighted-sample.d.ts +2 -0
  133. package/dist/operators/where-if.d.ts +2 -0
  134. package/dist/operators/where.d.ts +2 -0
  135. package/dist/operators/with-neighbors.d.ts +2 -0
  136. package/dist/operators/zip.d.ts +2 -0
  137. package/dist/src-D_Mk3oMP.js +1597 -0
  138. package/dist/types.d.ts +1154 -0
  139. package/dist/utils.d.ts +56 -0
  140. package/package.json +18 -11
  141. package/dist/linq.d.ts +0 -256
  142. package/dist/linq.js +0 -3085
  143. package/dist/linqx.d.ts +0 -36
  144. package/dist/linqx.js +0 -153
@@ -0,0 +1,9 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ /**
3
+ * Creates an infinite descending arithmetic sequence.
4
+ *
5
+ * @param start The first value; defaults to zero.
6
+ * @param step The amount subtracted after each element; defaults to one.
7
+ * @returns An infinite deferred numeric sequence.
8
+ */
9
+ export declare function toNegativeInfinity(start?: number, step?: number): IEnumerable<number>;
@@ -0,0 +1,9 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ /**
3
+ * Creates an infinite sequence by repeatedly transforming the previous value.
4
+ *
5
+ * @param seed The first value.
6
+ * @param func Produces the next value from the current value.
7
+ * @returns An infinite deferred sequence beginning with `seed`.
8
+ */
9
+ export declare function unfold<T>(seed: T, func: (value: T) => T): IEnumerable<T>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,88 @@
1
- import Enumerable from "./linq.js";
2
- import "./linqx.js";
1
+ import { choice } from './factories/choice.js';
2
+ import { cycle } from './factories/cycle.js';
3
+ import { defer } from './factories/defer.js';
4
+ import { empty } from './factories/empty.js';
5
+ import { from } from './factories/from.js';
6
+ import { generate } from './factories/generate.js';
7
+ import { make } from './factories/make.js';
8
+ import { matches } from './factories/matches.js';
9
+ import { range } from './factories/range.js';
10
+ import { rangeDown } from './factories/range-down.js';
11
+ import { rangeTo } from './factories/range-to.js';
12
+ import { repeat } from './factories/repeat.js';
13
+ import { repeatWithFinalize } from './factories/repeat-with-finalize.js';
14
+ import { toInfinity } from './factories/to-infinity.js';
15
+ import { toNegativeInfinity } from './factories/to-negative-infinity.js';
16
+ import { unfold } from './factories/unfold.js';
17
+ import type { IDictionary as DictionaryInterface, IDisposableEnumerable as DisposableEnumerableInterface, IEnumerable as EnumerableInterface, IEnumerator as EnumeratorInterface, IGrouping as GroupingInterface, ILookup as LookupInterface, IOrderedEnumerable as OrderedEnumerableInterface, IPageInfo as PageInfo, Indexed as IndexedValue, KeyValuePair as Pair, Neighbors as NeighborValues, Positioned as PositionedValue } from './types.js';
18
+ /** Entry point for creating and working with LINQ-style sequences. */
19
+ export declare class Enumerable {
20
+ /** Low-level helpers for creating enumerables and extending iterable prototypes. */
21
+ static readonly Utils: import("./utils.js").EnumerableUtils;
22
+ /** Creates an infinite sequence that randomly chooses from the supplied values. */
23
+ static readonly choice: typeof choice;
24
+ /** Creates an infinite sequence that repeatedly emits the supplied values in order. */
25
+ static readonly cycle: typeof cycle;
26
+ /** Defers sequence creation until each enumeration begins. */
27
+ static readonly defer: typeof defer;
28
+ /** Creates an empty sequence. */
29
+ static readonly empty: typeof empty;
30
+ /** Converts an enumerable source, iterator, array-like value, object, or scalar to a sequence. */
31
+ static readonly from: typeof from;
32
+ /** Generates values by repeatedly invoking a function. */
33
+ static readonly generate: typeof generate;
34
+ /** Creates a sequence containing one element. */
35
+ static readonly make: typeof make;
36
+ /** Enumerates all regular-expression matches in a string. */
37
+ static readonly matches: typeof matches;
38
+ /** Creates a counted numeric sequence. */
39
+ static readonly range: typeof range;
40
+ /** Creates a counted descending numeric sequence. */
41
+ static readonly rangeDown: typeof rangeDown;
42
+ /** Creates an inclusive numeric sequence between two endpoints. */
43
+ static readonly rangeTo: typeof rangeTo;
44
+ /** Repeats an element a specified number of times or indefinitely. */
45
+ static readonly repeat: typeof repeat;
46
+ /** Repeats an initialized resource until enumeration stops, then finalizes it. */
47
+ static readonly repeatWithFinalize: typeof repeatWithFinalize;
48
+ /** Creates an infinite ascending numeric sequence. */
49
+ static readonly toInfinity: typeof toInfinity;
50
+ /** Creates an infinite descending numeric sequence. */
51
+ static readonly toNegativeInfinity: typeof toNegativeInfinity;
52
+ /** Creates an infinite sequence by repeatedly transforming the previous value. */
53
+ static readonly unfold: typeof unfold;
54
+ }
55
+ /** Type contracts exposed through the `Enumerable` namespace. */
56
+ export declare namespace Enumerable {
57
+ /** A composable iterable sequence with LINQ-style query operators. */
58
+ type IEnumerable<T> = EnumerableInterface<T>;
59
+ /** An imperative cursor over a sequence. */
60
+ type IEnumerator<T> = EnumeratorInterface<T>;
61
+ /** A sequence with one or more stable ordering criteria. */
62
+ type IOrderedEnumerable<T> = OrderedEnumerableInterface<T>;
63
+ /** A sequence whose backing iterator can be explicitly released. */
64
+ type IDisposableEnumerable<T> = DisposableEnumerableInterface<T>;
65
+ /** A mutable key-value collection with optional normalized-key comparison. */
66
+ type IDictionary<TKey, TValue> = DictionaryInterface<TKey, TValue>;
67
+ /** A read-only one-to-many mapping. */
68
+ type ILookup<TKey, TElement> = LookupInterface<TKey, TElement>;
69
+ /** A sequence of elements associated with a key. */
70
+ type IGrouping<TKey, TElement> = GroupingInterface<TKey, TElement>;
71
+ /** A one-based page number and page size. */
72
+ type IPageInfo = PageInfo;
73
+ /** A key associated with one value. */
74
+ type KeyValuePair<TKey, TValue> = Pair<TKey, TValue>;
75
+ /** A sequence element paired with its zero-based index. */
76
+ type Indexed<T> = IndexedValue<T>;
77
+ /** A sequence element annotated with index and boundary information. */
78
+ type Positioned<T> = PositionedValue<T>;
79
+ /** A sequence element paired with its immediate neighbors. */
80
+ type Neighbors<T> = NeighborValues<T>;
81
+ /** @deprecated Use {@link Indexed} instead. */
82
+ type IndexedItem<T> = Indexed<T>;
83
+ /** @deprecated Use {@link Positioned} instead. */
84
+ type PositionedItem<T> = Positioned<T>;
85
+ /** @deprecated Use {@link Neighbors} instead. */
86
+ type ItemWithNeighbors<T> = Neighbors<T>;
87
+ }
3
88
  export default Enumerable;
4
- export { Enumerable };
package/dist/index.js CHANGED
@@ -1,4 +1,2 @@
1
- import Enumerable from "./linq.js";
2
- import "./linqx.js";
3
- export default Enumerable;
4
- export { Enumerable };
1
+ import { t as e } from "./src-D_Mk3oMP.js";
2
+ export { e as Enumerable, e as default };
@@ -0,0 +1,3 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function createEnumerable<T>(iteratorFactory: () => Iterator<T>): IEnumerable<T>;
3
+ export declare function fromGenerator<T>(generatorFactory: () => Generator<T>): IEnumerable<T>;
@@ -0,0 +1,6 @@
1
+ import type { Comparer } from '../types.js';
2
+ export declare const identity: <T>(value: T) => T;
3
+ export declare function defaultComparer<T>(first: T, second: T): number;
4
+ export declare function reverseComparer<T>(comparer: Comparer<T>): Comparer<T>;
5
+ export declare function isIterable(value: unknown): value is Iterable<unknown>;
6
+ export declare function isArrayLike(value: unknown): value is ArrayLike<unknown>;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput } from '../types.js';
2
+ export declare function toIterable<T>(source: EnumerableInput<T>): Iterable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable, KeyValuePair } from '../types.js';
2
+ export declare function aggregateBy<T, TKey, TAccumulate>(this: IEnumerable<T>, keySelector: (element: T) => TKey, seed: TAccumulate, accumulator: (accumulate: TAccumulate, element: T) => TAccumulate, compareSelector?: (key: TKey) => unknown): IEnumerable<KeyValuePair<TKey, TAccumulate>>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function aggregate<T, TAccumulate, TResult>(this: IEnumerable<T>, seedOrFunc: TAccumulate | ((prev: T, current: T) => T), func?: (prev: TAccumulate, current: T) => TAccumulate, resultSelector?: (last: TAccumulate) => TResult): T | TAccumulate | TResult;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function all<T>(this: IEnumerable<T>, predicate: (element: T) => boolean): boolean;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function alternate<T>(this: IEnumerable<T>, alternateValue: T | EnumerableInput<T>): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function any<T>(this: IEnumerable<T>, predicate?: (element: T) => boolean): boolean;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function append<T>(this: IEnumerable<T>, element: T): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function asEnumerable<T>(this: IEnumerable<T>): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function average<T>(this: IEnumerable<T>, selector?: (element: T) => number): number;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function buffer<T>(this: IEnumerable<T>, count: number): IEnumerable<T[]>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function cast<T, TResult>(this: IEnumerable<T>): IEnumerable<TResult>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function catchError<T>(this: IEnumerable<T>, handler: (exception: unknown) => void): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function choose<T>(this: IEnumerable<T>, selector: (element: T, index: number) => T): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function chunk<T>(this: IEnumerable<T>, size: number): IEnumerable<T[]>;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function concat<T>(this: IEnumerable<T>, ...sequences: EnumerableInput<T>[]): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function contains<T, TCompare>(this: IEnumerable<T>, value: T, compareSelector?: (element: T) => TCompare): boolean;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable, KeyValuePair } from '../types.js';
2
+ export declare function countBy<T, TKey>(this: IEnumerable<T>, keySelector: (element: T) => TKey, compareSelector?: (key: TKey) => unknown): IEnumerable<KeyValuePair<TKey, number>>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function count<T>(this: IEnumerable<T>, predicate?: (element: T, index: number) => boolean): number;
@@ -0,0 +1,2 @@
1
+ import type { Comparer, IOrderedEnumerable } from '../types.js';
2
+ export declare function createOrderedEnumerable<T, TKey>(this: IOrderedEnumerable<T>, keySelector: (element: T) => TKey, comparer?: Comparer<TKey>, descending?: boolean): IOrderedEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function defaultIfEmpty<T>(this: IEnumerable<T>, defaultValue?: T): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function distinctBy<T, TKey, TCompare = TKey>(this: IEnumerable<T>, keySelector: (element: T) => TKey, compareSelector?: (key: TKey) => TCompare): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function distinctUntilChanged<T, TCompare>(this: IEnumerable<T>, compareSelector?: (element: T) => TCompare): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function distinct<T, TCompare>(this: IEnumerable<T>, compareSelector?: (element: T) => TCompare): IEnumerable<T>;
@@ -0,0 +1,3 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function doAction<T>(this: IEnumerable<T>, action: (element: T, index: number) => void): IEnumerable<T>;
3
+ export declare function doAction<T>(this: IEnumerable<T>, action: (element: T, index: number) => boolean): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function elementAtOrDefault<T>(this: IEnumerable<T>, index: number, defaultValue?: T): T | undefined;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function elementAt<T>(this: IEnumerable<T>, index: number): T;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function exceptBy<T, TKey, TCompare = TKey>(this: IEnumerable<T>, second: EnumerableInput<TKey>, keySelector: (element: T) => TKey, compareSelector?: (key: TKey) => TCompare): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function except<T, TCompare>(this: IEnumerable<T>, second: EnumerableInput<T>, compareSelector?: (element: T) => TCompare): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function finallyAction<T>(this: IEnumerable<T>, action: () => void): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function firstOrDefault<T, TDefault>(this: IEnumerable<T>, predicateOrDefault?: ((element: T, index: number) => boolean) | TDefault, defaultValue?: TDefault): T | TDefault | undefined;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function first<T>(this: IEnumerable<T>, predicate?: (element: T, index: number) => boolean): T;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function flatten<T>(this: IEnumerable<T>): IEnumerable<unknown>;
@@ -0,0 +1,3 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function forEach<T>(this: IEnumerable<T>, action: (element: T, index: number) => void): void;
3
+ export declare function forEach<T>(this: IEnumerable<T>, action: (element: T, index: number) => boolean): void;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function force<T>(this: IEnumerable<T>): void;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable, IGrouping } from '../types.js';
2
+ export declare function groupBy<T, TKey, TElement = T, TResult = IGrouping<TKey, TElement>>(this: IEnumerable<T>, keySelector: (element: T) => TKey, elementSelector?: (element: T) => TElement, resultSelector?: ((key: TKey, elements: IEnumerable<TElement>) => TResult) | undefined, compareSelector?: (key: TKey) => unknown): IEnumerable<TResult>;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function groupJoin<TOuter, TInner, TKey, TResult>(this: IEnumerable<TOuter>, inner: EnumerableInput<TInner>, outerKeySelector: (outer: TOuter) => TKey, innerKeySelector: (inner: TInner) => TKey, resultSelector: (outer: TOuter, inner: IEnumerable<TInner>) => TResult, compareSelector?: (key: TKey) => unknown): IEnumerable<TResult>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function indexOf<T>(this: IEnumerable<T>, itemOrPredicate: T | ((element: T, index: number) => boolean)): number;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable, Indexed } from '../types.js';
2
+ export declare function index<T>(this: IEnumerable<T>): IEnumerable<Indexed<T>>;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function insert<T>(this: IEnumerable<T>, index: number, second: EnumerableInput<T>): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function intersectBy<T, TKey, TCompare = TKey>(this: IEnumerable<T>, second: EnumerableInput<TKey>, keySelector: (element: T) => TKey, compareSelector?: (key: TKey) => TCompare): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function intersect<T, TCompare>(this: IEnumerable<T>, second: EnumerableInput<T>, compareSelector?: (element: T) => TCompare): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function isEmpty<T>(this: IEnumerable<T>): boolean;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function joinWith<T>(this: IEnumerable<T>, separator: string | ((element: T) => T)): string | IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function join<TOuter, TInner, TKey, TResult>(this: IEnumerable<TOuter>, inner: EnumerableInput<TInner>, outerKeySelector: (outer: TOuter) => TKey, innerKeySelector: (inner: TInner) => TKey, resultSelector: (outer: TOuter, inner: TInner) => TResult, compareSelector?: (key: TKey) => unknown): IEnumerable<TResult>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function lastIndexOf<T>(this: IEnumerable<T>, itemOrPredicate: T | ((element: T, index: number) => boolean)): number;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function lastOrDefault<T, TDefault>(this: IEnumerable<T>, predicateOrDefault?: ((element: T, index: number) => boolean) | TDefault, defaultValue?: TDefault): T | TDefault | undefined;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function last<T>(this: IEnumerable<T>, predicate?: (element: T, index: number) => boolean): T;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function leftJoin<TOuter, TInner, TKey, TResult>(this: IEnumerable<TOuter>, inner: EnumerableInput<TInner>, outerKeySelector: (outer: TOuter) => TKey, innerKeySelector: (inner: TInner) => TKey, resultSelector: (outer: TOuter, inner: TInner | null) => TResult, compareSelector?: (key: TKey) => unknown): IEnumerable<TResult>;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function letBind<T, TResult>(this: IEnumerable<T>, func: (source: IEnumerable<T>) => EnumerableInput<TResult>): IEnumerable<TResult>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function log<T, TValue = T>(this: IEnumerable<T>, selector?: (element: T) => TValue): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function map<T, TResult>(this: IEnumerable<T>, selector: (element: T, index: number) => TResult): TResult[];
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function maxBy<T, TKey>(this: IEnumerable<T>, keySelector: (element: T) => TKey): T;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function max<T>(this: IEnumerable<T>, selector?: (element: T) => number): number;
@@ -0,0 +1,2 @@
1
+ import type { IDisposableEnumerable, IEnumerable } from '../types.js';
2
+ export declare function memoize<T>(this: IEnumerable<T>): IDisposableEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { EnumerableInput, IEnumerable } from '../types.js';
2
+ export declare function merge<T>(this: IEnumerable<T>, ...others: EnumerableInput<T>[]): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function minBy<T, TKey>(this: IEnumerable<T>, keySelector: (element: T) => TKey): T;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function min<T>(this: IEnumerable<T>, selector?: (element: T) => number): number;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function ofType<T, TResult>(this: IEnumerable<T>, type: unknown): IEnumerable<TResult>;
@@ -0,0 +1,208 @@
1
+ import { aggregate } from './aggregate.js';
2
+ import { aggregateBy } from './aggregate-by.js';
3
+ import { all } from './all.js';
4
+ import { alternate } from './alternate.js';
5
+ import { any } from './any.js';
6
+ import { append } from './append.js';
7
+ import { asEnumerable } from './as-enumerable.js';
8
+ import { average } from './average.js';
9
+ import { buffer } from './buffer.js';
10
+ import { cast } from './cast.js';
11
+ import { catchError } from './catch-error.js';
12
+ import { choose } from './choose.js';
13
+ import { chunk } from './chunk.js';
14
+ import { concat } from './concat.js';
15
+ import { contains } from './contains.js';
16
+ import { count } from './count.js';
17
+ import { countBy } from './count-by.js';
18
+ import { createOrderedEnumerable } from './create-ordered-enumerable.js';
19
+ import { defaultIfEmpty } from './default-if-empty.js';
20
+ import { distinct } from './distinct.js';
21
+ import { distinctBy } from './distinct-by.js';
22
+ import { distinctUntilChanged } from './distinct-until-changed.js';
23
+ import { doAction } from './do-action.js';
24
+ import { elementAt } from './element-at.js';
25
+ import { elementAtOrDefault } from './element-at-or-default.js';
26
+ import { except } from './except.js';
27
+ import { exceptBy } from './except-by.js';
28
+ import { finallyAction } from './finally-action.js';
29
+ import { first } from './first.js';
30
+ import { firstOrDefault } from './first-or-default.js';
31
+ import { flatten } from './flatten.js';
32
+ import { force } from './force.js';
33
+ import { forEach } from './for-each.js';
34
+ import { groupBy } from './group-by.js';
35
+ import { groupJoin } from './group-join.js';
36
+ import { index } from './index.js';
37
+ import { indexOf } from './index-of.js';
38
+ import { insert } from './insert.js';
39
+ import { intersect } from './intersect.js';
40
+ import { intersectBy } from './intersect-by.js';
41
+ import { isEmpty } from './is-empty.js';
42
+ import { join } from './join.js';
43
+ import { joinWith } from './join-with.js';
44
+ import { last } from './last.js';
45
+ import { lastIndexOf } from './last-index-of.js';
46
+ import { lastOrDefault } from './last-or-default.js';
47
+ import { leftJoin } from './left-join.js';
48
+ import { letBind } from './let-bind.js';
49
+ import { log } from './log.js';
50
+ import { map } from './map.js';
51
+ import { max } from './max.js';
52
+ import { maxBy } from './max-by.js';
53
+ import { memoize } from './memoize.js';
54
+ import { merge } from './merge.js';
55
+ import { min } from './min.js';
56
+ import { minBy } from './min-by.js';
57
+ import { ofType } from './of-type.js';
58
+ import { orderBy } from './order-by.js';
59
+ import { orderByDescending } from './order-by-descending.js';
60
+ import { page } from './page.js';
61
+ import { pairwise } from './pairwise.js';
62
+ import { partitionBy } from './partition-by.js';
63
+ import { position } from './position.js';
64
+ import { prepend } from './prepend.js';
65
+ import { reverse } from './reverse.js';
66
+ import { rightJoin } from './right-join.js';
67
+ import { scan } from './scan.js';
68
+ import { select } from './select.js';
69
+ import { selectMany } from './select-many.js';
70
+ import { sequenceEqual } from './sequence-equal.js';
71
+ import { share } from './share.js';
72
+ import { shuffle } from './shuffle.js';
73
+ import { single } from './single.js';
74
+ import { singleOrDefault } from './single-or-default.js';
75
+ import { skip } from './skip.js';
76
+ import { skipLast } from './skip-last.js';
77
+ import { skipWhile } from './skip-while.js';
78
+ import { sum } from './sum.js';
79
+ import { take } from './take.js';
80
+ import { takeExceptLast } from './take-except-last.js';
81
+ import { takeFromLast } from './take-from-last.js';
82
+ import { takeLast } from './take-last.js';
83
+ import { takeWhile } from './take-while.js';
84
+ import { thenBy } from './then-by.js';
85
+ import { thenByDescending } from './then-by-descending.js';
86
+ import { toArray } from './to-array.js';
87
+ import { toDictionary } from './to-dictionary.js';
88
+ import { toJoinedString } from './to-joined-string.js';
89
+ import { toJSONString } from './to-json-string.js';
90
+ import { toLookup } from './to-lookup.js';
91
+ import { toMap } from './to-map.js';
92
+ import { toObject } from './to-object.js';
93
+ import { toSet } from './to-set.js';
94
+ import { trace } from './trace.js';
95
+ import { traverseBreadthFirst } from './traverse-breadth-first.js';
96
+ import { traverseDepthFirst } from './traverse-depth-first.js';
97
+ import { union } from './union.js';
98
+ import { unionBy } from './union-by.js';
99
+ import { weightedSample } from './weighted-sample.js';
100
+ import { where } from './where.js';
101
+ import { whereIf } from './where-if.js';
102
+ import { withNeighbors } from './with-neighbors.js';
103
+ import { zip } from './zip.js';
104
+ export declare const instanceOperators: {
105
+ aggregate: typeof aggregate;
106
+ aggregateBy: typeof aggregateBy;
107
+ all: typeof all;
108
+ alternate: typeof alternate;
109
+ any: typeof any;
110
+ append: typeof append;
111
+ asEnumerable: typeof asEnumerable;
112
+ average: typeof average;
113
+ buffer: typeof buffer;
114
+ cast: typeof cast;
115
+ catchError: typeof catchError;
116
+ choose: typeof choose;
117
+ chunk: typeof chunk;
118
+ concat: typeof concat;
119
+ contains: typeof contains;
120
+ count: typeof count;
121
+ countBy: typeof countBy;
122
+ createOrderedEnumerable: typeof createOrderedEnumerable;
123
+ defaultIfEmpty: typeof defaultIfEmpty;
124
+ distinct: typeof distinct;
125
+ distinctBy: typeof distinctBy;
126
+ distinctUntilChanged: typeof distinctUntilChanged;
127
+ doAction: typeof doAction;
128
+ elementAt: typeof elementAt;
129
+ elementAtOrDefault: typeof elementAtOrDefault;
130
+ except: typeof except;
131
+ exceptBy: typeof exceptBy;
132
+ finallyAction: typeof finallyAction;
133
+ first: typeof first;
134
+ firstOrDefault: typeof firstOrDefault;
135
+ flatten: typeof flatten;
136
+ force: typeof force;
137
+ forEach: typeof forEach;
138
+ groupBy: typeof groupBy;
139
+ groupJoin: typeof groupJoin;
140
+ index: typeof index;
141
+ indexOf: typeof indexOf;
142
+ insert: typeof insert;
143
+ intersect: typeof intersect;
144
+ intersectBy: typeof intersectBy;
145
+ isEmpty: typeof isEmpty;
146
+ join: typeof join;
147
+ joinWith: typeof joinWith;
148
+ last: typeof last;
149
+ lastIndexOf: typeof lastIndexOf;
150
+ lastOrDefault: typeof lastOrDefault;
151
+ leftJoin: typeof leftJoin;
152
+ letBind: typeof letBind;
153
+ log: typeof log;
154
+ map: typeof map;
155
+ max: typeof max;
156
+ maxBy: typeof maxBy;
157
+ memoize: typeof memoize;
158
+ merge: typeof merge;
159
+ min: typeof min;
160
+ minBy: typeof minBy;
161
+ ofType: typeof ofType;
162
+ orderBy: typeof orderBy;
163
+ orderByDescending: typeof orderByDescending;
164
+ page: typeof page;
165
+ pairwise: typeof pairwise;
166
+ partitionBy: typeof partitionBy;
167
+ position: typeof position;
168
+ prepend: typeof prepend;
169
+ reverse: typeof reverse;
170
+ rightJoin: typeof rightJoin;
171
+ scan: typeof scan;
172
+ select: typeof select;
173
+ selectMany: typeof selectMany;
174
+ sequenceEqual: typeof sequenceEqual;
175
+ share: typeof share;
176
+ shuffle: typeof shuffle;
177
+ single: typeof single;
178
+ singleOrDefault: typeof singleOrDefault;
179
+ skip: typeof skip;
180
+ skipLast: typeof skipLast;
181
+ skipWhile: typeof skipWhile;
182
+ sum: typeof sum;
183
+ take: typeof take;
184
+ takeExceptLast: typeof takeExceptLast;
185
+ takeFromLast: typeof takeFromLast;
186
+ takeLast: typeof takeLast;
187
+ takeWhile: typeof takeWhile;
188
+ thenBy: typeof thenBy;
189
+ thenByDescending: typeof thenByDescending;
190
+ toArray: typeof toArray;
191
+ toDictionary: typeof toDictionary;
192
+ toJoinedString: typeof toJoinedString;
193
+ toJSONString: typeof toJSONString;
194
+ toLookup: typeof toLookup;
195
+ toMap: typeof toMap;
196
+ toObject: typeof toObject;
197
+ toSet: typeof toSet;
198
+ trace: typeof trace;
199
+ traverseBreadthFirst: typeof traverseBreadthFirst;
200
+ traverseDepthFirst: typeof traverseDepthFirst;
201
+ union: typeof union;
202
+ unionBy: typeof unionBy;
203
+ weightedSample: typeof weightedSample;
204
+ where: typeof where;
205
+ whereIf: typeof whereIf;
206
+ withNeighbors: typeof withNeighbors;
207
+ zip: typeof zip;
208
+ };
@@ -0,0 +1,2 @@
1
+ import type { Comparer, IEnumerable, IOrderedEnumerable } from '../types.js';
2
+ export declare function orderByDescending<T, TKey>(this: IEnumerable<T>, keySelector: (element: T) => TKey, comparer?: Comparer<TKey>): IOrderedEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { Comparer, IEnumerable, IOrderedEnumerable } from '../types.js';
2
+ export declare function orderBy<T, TKey>(this: IEnumerable<T>, keySelector: (element: T) => TKey, comparer?: Comparer<TKey>): IOrderedEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable, IPageInfo } from '../types.js';
2
+ export declare function page<T>(this: IEnumerable<T>, pageNumberOrInfo: number | IPageInfo, pageSize?: number): IEnumerable<T>;
@@ -0,0 +1,2 @@
1
+ import type { IEnumerable } from '../types.js';
2
+ export declare function pairwise<T, TResult>(this: IEnumerable<T>, selector: (prev: T, current: T) => TResult): IEnumerable<TResult>;