@tidyjs/tidy 2.5.2 → 2.6.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 (245) hide show
  1. package/dist/es/addRows.js.map +1 -1
  2. package/dist/es/arrange.js +9 -5
  3. package/dist/es/arrange.js.map +1 -1
  4. package/dist/es/complete.js.map +1 -1
  5. package/dist/es/count.js +6 -2
  6. package/dist/es/count.js.map +1 -1
  7. package/dist/es/debug.js +4 -2
  8. package/dist/es/debug.js.map +1 -1
  9. package/dist/es/distinct.js +3 -3
  10. package/dist/es/distinct.js.map +1 -1
  11. package/dist/es/expand.js +18 -13
  12. package/dist/es/expand.js.map +1 -1
  13. package/dist/es/fill.js +10 -3
  14. package/dist/es/fill.js.map +1 -1
  15. package/dist/es/filter.js.map +1 -1
  16. package/dist/es/fullJoin.js +23 -20
  17. package/dist/es/fullJoin.js.map +1 -1
  18. package/dist/es/groupBy.js +56 -28
  19. package/dist/es/groupBy.js.map +1 -1
  20. package/dist/es/helpers/assignGroupKeys.js +4 -4
  21. package/dist/es/helpers/assignGroupKeys.js.map +1 -1
  22. package/dist/es/helpers/groupMap.js +2 -2
  23. package/dist/es/helpers/groupMap.js.map +1 -1
  24. package/dist/es/helpers/groupTraversal.js +5 -4
  25. package/dist/es/helpers/groupTraversal.js.map +1 -1
  26. package/dist/es/helpers/identity.js.map +1 -1
  27. package/dist/es/helpers/isObject.js.map +1 -1
  28. package/dist/es/helpers/keysFromItems.js +1 -2
  29. package/dist/es/helpers/keysFromItems.js.map +1 -1
  30. package/dist/es/helpers/singleOrArray.js.map +1 -1
  31. package/dist/es/helpers/summation.js +11 -3
  32. package/dist/es/helpers/summation.js.map +1 -1
  33. package/dist/es/innerJoin.js +37 -12
  34. package/dist/es/innerJoin.js.map +1 -1
  35. package/dist/es/item/rate.js +2 -3
  36. package/dist/es/item/rate.js.map +1 -1
  37. package/dist/es/leftJoin.js +13 -8
  38. package/dist/es/leftJoin.js.map +1 -1
  39. package/dist/es/map.js.map +1 -1
  40. package/dist/es/math/math.js.map +1 -1
  41. package/dist/es/mutate.js +1 -1
  42. package/dist/es/mutate.js.map +1 -1
  43. package/dist/es/mutateWithSummary.js +1 -1
  44. package/dist/es/mutateWithSummary.js.map +1 -1
  45. package/dist/es/pivotLonger.js +31 -7
  46. package/dist/es/pivotLonger.js.map +1 -1
  47. package/dist/es/pivotWider.js +24 -19
  48. package/dist/es/pivotWider.js.map +1 -1
  49. package/dist/es/rename.js.map +1 -1
  50. package/dist/es/replaceNully.js +1 -1
  51. package/dist/es/replaceNully.js.map +1 -1
  52. package/dist/es/select.js +3 -3
  53. package/dist/es/select.js.map +1 -1
  54. package/dist/es/selectors/contains.js.map +1 -1
  55. package/dist/es/selectors/endsWith.js.map +1 -1
  56. package/dist/es/selectors/everything.js.map +1 -1
  57. package/dist/es/selectors/matches.js.map +1 -1
  58. package/dist/es/selectors/negate.js +2 -2
  59. package/dist/es/selectors/negate.js.map +1 -1
  60. package/dist/es/selectors/numRange.js.map +1 -1
  61. package/dist/es/selectors/startsWith.js.map +1 -1
  62. package/dist/es/sequences/fullSeq.js +5 -1
  63. package/dist/es/sequences/fullSeq.js.map +1 -1
  64. package/dist/es/slice.js +2 -3
  65. package/dist/es/slice.js.map +1 -1
  66. package/dist/es/summarize.js +6 -4
  67. package/dist/es/summarize.js.map +1 -1
  68. package/dist/es/summary/deviation.js.map +1 -1
  69. package/dist/es/summary/first.js.map +1 -1
  70. package/dist/es/summary/last.js.map +1 -1
  71. package/dist/es/summary/max.js.map +1 -1
  72. package/dist/es/summary/mean.js.map +1 -1
  73. package/dist/es/summary/meanRate.js.map +1 -1
  74. package/dist/es/summary/median.js.map +1 -1
  75. package/dist/es/summary/min.js.map +1 -1
  76. package/dist/es/summary/n.js.map +1 -1
  77. package/dist/es/summary/nDistinct.js +2 -2
  78. package/dist/es/summary/nDistinct.js.map +1 -1
  79. package/dist/es/summary/sum.js.map +1 -1
  80. package/dist/es/summary/variance.js.map +1 -1
  81. package/dist/es/tally.js +4 -2
  82. package/dist/es/tally.js.map +1 -1
  83. package/dist/es/tidy.js.map +1 -1
  84. package/dist/es/total.js.map +1 -1
  85. package/dist/es/transmute.js.map +1 -1
  86. package/dist/es/vector/cumsum.js.map +1 -1
  87. package/dist/es/vector/lag.js +1 -1
  88. package/dist/es/vector/lag.js.map +1 -1
  89. package/dist/es/vector/lead.js +1 -1
  90. package/dist/es/vector/lead.js.map +1 -1
  91. package/dist/es/vector/roll.js +1 -1
  92. package/dist/es/vector/roll.js.map +1 -1
  93. package/dist/es/vector/rowNumber.js.map +1 -1
  94. package/dist/es/when.js +1 -2
  95. package/dist/es/when.js.map +1 -1
  96. package/dist/lib/addRows.js +0 -2
  97. package/dist/lib/addRows.js.map +1 -1
  98. package/dist/lib/arrange.js +9 -7
  99. package/dist/lib/arrange.js.map +1 -1
  100. package/dist/lib/complete.js +0 -2
  101. package/dist/lib/complete.js.map +1 -1
  102. package/dist/lib/count.js +6 -4
  103. package/dist/lib/count.js.map +1 -1
  104. package/dist/lib/debug.js +4 -4
  105. package/dist/lib/debug.js.map +1 -1
  106. package/dist/lib/distinct.js +3 -5
  107. package/dist/lib/distinct.js.map +1 -1
  108. package/dist/lib/expand.js +18 -15
  109. package/dist/lib/expand.js.map +1 -1
  110. package/dist/lib/fill.js +10 -5
  111. package/dist/lib/fill.js.map +1 -1
  112. package/dist/lib/filter.js +0 -2
  113. package/dist/lib/filter.js.map +1 -1
  114. package/dist/lib/fullJoin.js +22 -21
  115. package/dist/lib/fullJoin.js.map +1 -1
  116. package/dist/lib/groupBy.js +56 -30
  117. package/dist/lib/groupBy.js.map +1 -1
  118. package/dist/lib/helpers/assignGroupKeys.js +4 -6
  119. package/dist/lib/helpers/assignGroupKeys.js.map +1 -1
  120. package/dist/lib/helpers/groupMap.js +2 -4
  121. package/dist/lib/helpers/groupMap.js.map +1 -1
  122. package/dist/lib/helpers/groupTraversal.js +5 -6
  123. package/dist/lib/helpers/groupTraversal.js.map +1 -1
  124. package/dist/lib/helpers/identity.js +0 -2
  125. package/dist/lib/helpers/identity.js.map +1 -1
  126. package/dist/lib/helpers/isObject.js +0 -2
  127. package/dist/lib/helpers/isObject.js.map +1 -1
  128. package/dist/lib/helpers/keysFromItems.js +1 -4
  129. package/dist/lib/helpers/keysFromItems.js.map +1 -1
  130. package/dist/lib/helpers/singleOrArray.js +0 -2
  131. package/dist/lib/helpers/singleOrArray.js.map +1 -1
  132. package/dist/lib/helpers/summation.js +10 -4
  133. package/dist/lib/helpers/summation.js.map +1 -1
  134. package/dist/lib/index.js +0 -2
  135. package/dist/lib/index.js.map +1 -1
  136. package/dist/lib/innerJoin.js +38 -14
  137. package/dist/lib/innerJoin.js.map +1 -1
  138. package/dist/lib/item/rate.js +2 -5
  139. package/dist/lib/item/rate.js.map +1 -1
  140. package/dist/lib/leftJoin.js +12 -9
  141. package/dist/lib/leftJoin.js.map +1 -1
  142. package/dist/lib/map.js +0 -2
  143. package/dist/lib/map.js.map +1 -1
  144. package/dist/lib/math/math.js +0 -2
  145. package/dist/lib/math/math.js.map +1 -1
  146. package/dist/lib/mutate.js +1 -3
  147. package/dist/lib/mutate.js.map +1 -1
  148. package/dist/lib/mutateWithSummary.js +1 -3
  149. package/dist/lib/mutateWithSummary.js.map +1 -1
  150. package/dist/lib/pivotLonger.js +31 -9
  151. package/dist/lib/pivotLonger.js.map +1 -1
  152. package/dist/lib/pivotWider.js +24 -21
  153. package/dist/lib/pivotWider.js.map +1 -1
  154. package/dist/lib/rename.js +0 -2
  155. package/dist/lib/rename.js.map +1 -1
  156. package/dist/lib/replaceNully.js +1 -3
  157. package/dist/lib/replaceNully.js.map +1 -1
  158. package/dist/lib/select.js +3 -5
  159. package/dist/lib/select.js.map +1 -1
  160. package/dist/lib/selectors/contains.js +0 -2
  161. package/dist/lib/selectors/contains.js.map +1 -1
  162. package/dist/lib/selectors/endsWith.js +0 -2
  163. package/dist/lib/selectors/endsWith.js.map +1 -1
  164. package/dist/lib/selectors/everything.js +0 -2
  165. package/dist/lib/selectors/everything.js.map +1 -1
  166. package/dist/lib/selectors/matches.js +0 -2
  167. package/dist/lib/selectors/matches.js.map +1 -1
  168. package/dist/lib/selectors/negate.js +2 -4
  169. package/dist/lib/selectors/negate.js.map +1 -1
  170. package/dist/lib/selectors/numRange.js +0 -2
  171. package/dist/lib/selectors/numRange.js.map +1 -1
  172. package/dist/lib/selectors/startsWith.js +0 -2
  173. package/dist/lib/selectors/startsWith.js.map +1 -1
  174. package/dist/lib/sequences/fullSeq.js +5 -3
  175. package/dist/lib/sequences/fullSeq.js.map +1 -1
  176. package/dist/lib/slice.js +2 -5
  177. package/dist/lib/slice.js.map +1 -1
  178. package/dist/lib/summarize.js +6 -6
  179. package/dist/lib/summarize.js.map +1 -1
  180. package/dist/lib/summary/deviation.js +0 -2
  181. package/dist/lib/summary/deviation.js.map +1 -1
  182. package/dist/lib/summary/first.js +0 -2
  183. package/dist/lib/summary/first.js.map +1 -1
  184. package/dist/lib/summary/last.js +0 -2
  185. package/dist/lib/summary/last.js.map +1 -1
  186. package/dist/lib/summary/max.js +0 -2
  187. package/dist/lib/summary/max.js.map +1 -1
  188. package/dist/lib/summary/mean.js +0 -2
  189. package/dist/lib/summary/mean.js.map +1 -1
  190. package/dist/lib/summary/meanRate.js +0 -2
  191. package/dist/lib/summary/meanRate.js.map +1 -1
  192. package/dist/lib/summary/median.js +0 -2
  193. package/dist/lib/summary/median.js.map +1 -1
  194. package/dist/lib/summary/min.js +0 -2
  195. package/dist/lib/summary/min.js.map +1 -1
  196. package/dist/lib/summary/n.js +0 -2
  197. package/dist/lib/summary/n.js.map +1 -1
  198. package/dist/lib/summary/nDistinct.js +2 -4
  199. package/dist/lib/summary/nDistinct.js.map +1 -1
  200. package/dist/lib/summary/sum.js +0 -2
  201. package/dist/lib/summary/sum.js.map +1 -1
  202. package/dist/lib/summary/variance.js +0 -2
  203. package/dist/lib/summary/variance.js.map +1 -1
  204. package/dist/lib/tally.js +4 -4
  205. package/dist/lib/tally.js.map +1 -1
  206. package/dist/lib/tidy.js +0 -2
  207. package/dist/lib/tidy.js.map +1 -1
  208. package/dist/lib/total.js +0 -2
  209. package/dist/lib/total.js.map +1 -1
  210. package/dist/lib/transmute.js +0 -2
  211. package/dist/lib/transmute.js.map +1 -1
  212. package/dist/lib/vector/cumsum.js +0 -2
  213. package/dist/lib/vector/cumsum.js.map +1 -1
  214. package/dist/lib/vector/lag.js +1 -3
  215. package/dist/lib/vector/lag.js.map +1 -1
  216. package/dist/lib/vector/lead.js +1 -3
  217. package/dist/lib/vector/lead.js.map +1 -1
  218. package/dist/lib/vector/roll.js +1 -3
  219. package/dist/lib/vector/roll.js.map +1 -1
  220. package/dist/lib/vector/rowNumber.js +0 -2
  221. package/dist/lib/vector/rowNumber.js.map +1 -1
  222. package/dist/lib/when.js +1 -4
  223. package/dist/lib/when.js.map +1 -1
  224. package/dist/tidy.d.ts +217 -1775
  225. package/dist/umd/tidy.js +307 -184
  226. package/dist/umd/tidy.js.map +1 -1
  227. package/dist/umd/tidy.min.js +1 -1
  228. package/dist/umd/tidy.min.js.map +1 -1
  229. package/genai-docs/api-core.md +357 -0
  230. package/genai-docs/api-grouping.md +400 -0
  231. package/genai-docs/api-joins.md +118 -0
  232. package/genai-docs/api-other.md +238 -0
  233. package/genai-docs/api-pivot.md +112 -0
  234. package/genai-docs/api-selectors.md +159 -0
  235. package/genai-docs/api-sequences.md +127 -0
  236. package/genai-docs/api-slice.md +137 -0
  237. package/genai-docs/api-summarize.md +528 -0
  238. package/genai-docs/api-vector.md +239 -0
  239. package/genai-docs/gotchas.md +193 -0
  240. package/genai-docs/index.md +44 -0
  241. package/genai-docs/mental-model.md +270 -0
  242. package/genai-docs/patterns.md +384 -0
  243. package/genai-docs/quick-reference.md +125 -0
  244. package/package.json +16 -10
  245. package/LICENSE +0 -21
package/dist/tidy.d.ts CHANGED
@@ -1,18 +1,14 @@
1
- import { A, O, U } from 'ts-toolbelt';
2
- import { MergeFlat } from 'Object/Merge';
3
- import { BuiltInObject } from 'Misc/BuiltInObject';
4
-
5
- declare type Datum = Record<Key, any>;
6
- declare type Vector<T, K extends keyof T = keyof T> = T[K][];
7
- declare type Key = string | number;
8
- declare type KeyOrFn<T> = keyof T | ((item: T) => unknown);
9
- declare type Comparator<T> = (a: T, b: T) => number;
10
- declare type Primitive = number | string | boolean | Date;
11
- declare type NonFunctionValue = boolean | string | number | null | undefined | Array<any> | {
1
+ type Datum = Record<Key, any>;
2
+ type Vector<T, K extends keyof T = keyof T> = T[K][];
3
+ type Key = string | number;
4
+ type KeyOrFn<T> = keyof T | ((item: T) => unknown);
5
+ type Comparator<T> = (a: T, b: T) => number;
6
+ type Primitive = number | string | boolean | Date;
7
+ type NonFunctionValue = boolean | string | number | null | undefined | Array<any> | {
12
8
  [key: string]: NonFunctionValue;
13
9
  };
14
- declare type GroupKey<K = any> = [string, K];
15
- declare type Grouped<T> = Map<GroupKey<any>, T[] | Grouped<T>>;
10
+ type GroupKey<K = any> = [string, K];
11
+ type Grouped<T> = Map<GroupKey<any>, T[] | Grouped<T>>;
16
12
  interface TidyContext {
17
13
  /** when grouped, tidy functions can access the grouping keys here */
18
14
  groupKeys?: GroupKey[];
@@ -20,13 +16,13 @@ interface TidyContext {
20
16
  /**
21
17
  * Takes in array of items, outputs array of items
22
18
  */
23
- declare type TidyFn<InputT extends object, OutputT = InputT> = (items: InputT[], context?: TidyContext) => OutputT[];
19
+ type TidyFn<InputT extends object, OutputT = InputT> = (items: InputT[], context?: TidyContext) => OutputT[];
24
20
  /**
25
21
  * Takes in grouped items and outputs some modified version that
26
22
  * will no longer be accepted in tidy flows.
27
23
  */
28
- declare type TidyGroupExportFn<InputT extends object, ExportedT> = (items: InputT[], context?: TidyContext) => ExportedT;
29
- declare type Granularity = 's' | 'seconds' | 'second' | 'min' | 'minutes' | 'minute' | 'd' | 'days' | 'day' | 'w' | 'week' | 'weeks' | 'm' | 'month' | 'months' | 'y' | 'year' | 'years';
24
+ type TidyGroupExportFn<InputT extends object, ExportedT> = (items: InputT[], context?: TidyContext) => ExportedT;
25
+ type Granularity = 's' | 'seconds' | 'second' | 'min' | 'minutes' | 'minute' | 'd' | 'days' | 'day' | 'w' | 'week' | 'weeks' | 'm' | 'month' | 'months' | 'y' | 'year' | 'years';
30
26
 
31
27
  /**
32
28
  * Forms a tidy pipeline that can be called with (items)
@@ -72,7 +68,7 @@ declare function when<T extends object>(predicate: ((items: T[]) => boolean) | b
72
68
  */
73
69
  declare function map<T extends object, OutputT>(mapFn: (item: T, index: number, array: T[]) => OutputT): TidyFn<T, OutputT>;
74
70
 
75
- declare type SingleOrArray<T> = T | T[];
71
+ type SingleOrArray<T> = T | T[];
76
72
 
77
73
  /**
78
74
  * Removes items with duplicate values for the specified keys.
@@ -107,37 +103,58 @@ declare function fixedOrder<T>(key: KeyOrFn<T>, order: Array<T[keyof T]>, option
107
103
  position?: 'start' | 'end';
108
104
  }): (a: T, b: T) => number;
109
105
 
110
- declare type SummarizeSpec<T> = Record<Key, (items: T[]) => any>;
106
+ /**
107
+ * Flatten an intersection into a plain object type for better IntelliSense.
108
+ * Replaces A.Compute from ts-toolbelt.
109
+ */
110
+ type Prettify<T> = {
111
+ [K in keyof T]: T[K];
112
+ } & {};
113
+ /**
114
+ * Merge two object types where A's properties take precedence over B's.
115
+ * Produces a flat object type (no leftover intersections) for clean
116
+ * resolution in both tsc and tsgo.
117
+ * Replaces O.Merge from ts-toolbelt (where first arg wins).
118
+ */
119
+ type Merge<A, B> = Prettify<Omit<B, keyof A> & A>;
120
+ /**
121
+ * Find keys of T whose value type extends V.
122
+ * Replaces O.SelectKeys from ts-toolbelt.
123
+ */
124
+ type KeysMatching<T, V> = {
125
+ [K in keyof T]-?: T[K] extends V ? K : never;
126
+ }[keyof T];
127
+
128
+ type SummarizeSpec<T> = Record<Key, (items: T[]) => any>;
111
129
  interface SummarizeOptions<T = any> {
112
130
  rest?: (key: keyof T) => (items: T[]) => any;
113
131
  }
114
- declare type SummarizedT<T extends object, SumSpec extends SummarizeSpec<T>, Options extends SummarizeOptions<T> | undefined> = {
132
+ type SummarizedT<T extends object, SumSpec extends SummarizeSpec<T>, Options extends SummarizeOptions<T> | undefined> = {
115
133
  [K in keyof SumSpec]: ReturnType<SumSpec[K]>;
116
- } & // if there is a 'rest' option, add in the other values from T
117
- (NonNullable<Options>['rest'] extends Function ? Exclude<T, keyof SumSpec> : void);
134
+ } & (NonNullable<Options>['rest'] extends Function ? Omit<T, keyof SumSpec> : {});
118
135
  /**
119
136
  * summarizes items
120
137
  */
121
- declare function summarize<T extends object, SummarizedSpec extends SummarizeSpec<T> = SummarizeSpec<T>, Options extends SummarizeOptions<T> = SummarizeOptions<T>>(summarizeSpec: SummarizedSpec, options?: Options): TidyFn<T, A.Compute<SummarizedT<T, SummarizedSpec, Options>>>;
122
- declare type SummaryKeyFn<T, K = keyof T> = (key: K) => (items: T[]) => any;
123
- declare type SummaryFnOutput<T extends object, F extends SummaryKeyFn<T>> = ReturnType<ReturnType<F>>;
124
- declare function summarizeAll<T extends object, F extends SummaryKeyFn<T>>(summaryFn: F): TidyFn<T, A.Compute<Record<keyof T, SummaryFnOutput<T, F>>>>;
125
- declare function summarizeIf<T extends object, F extends SummaryKeyFn<T>>(predicateFn: (vector: Vector<T>) => boolean, summaryFn: F): TidyFn<T, A.Compute<Record<keyof T, SummaryFnOutput<T, F>>>>;
126
- declare function summarizeAt<T extends object, Keys extends (keyof T)[], F extends SummaryKeyFn<T, Keys[number]>>(keys: Keys, summaryFn: F): TidyFn<T, A.Compute<Record<Keys[number], SummaryFnOutput<T, F>>>>;
138
+ declare function summarize<T extends object, SummarizedSpec extends SummarizeSpec<T> = SummarizeSpec<T>, Options extends SummarizeOptions<T> = SummarizeOptions<T>>(summarizeSpec: SummarizedSpec, options?: Options): TidyFn<T, Prettify<SummarizedT<T, SummarizedSpec, Options>>>;
139
+ type SummaryKeyFn<T, K = keyof T> = (key: K) => (items: T[]) => any;
140
+ type SummaryFnOutput<T extends object, F extends SummaryKeyFn<T>> = ReturnType<ReturnType<F>>;
141
+ declare function summarizeAll<T extends object, F extends SummaryKeyFn<T>>(summaryFn: F): TidyFn<T, Prettify<Record<keyof T, SummaryFnOutput<T, F>>>>;
142
+ declare function summarizeIf<T extends object, F extends SummaryKeyFn<T>>(predicateFn: (vector: Vector<T>) => boolean, summaryFn: F): TidyFn<T, Prettify<Record<keyof T, SummaryFnOutput<T, F>>>>;
143
+ declare function summarizeAt<T extends object, Keys extends (keyof T)[], F extends SummaryKeyFn<T, Keys[number]>>(keys: Keys, summaryFn: F): TidyFn<T, Prettify<Record<Keys[number], SummaryFnOutput<T, F>>>>;
127
144
 
128
- declare type MutateSpecValue<T, O = any> = ((item: T, index: number, array: Iterable<T>) => O) | NonFunctionValue;
129
- declare type MutateSpec<T> = Record<Key, MutateSpecValue<T>>;
130
- declare type ResolvedObj<Obj extends Record<Key, MutateSpecValue<any>>> = {
145
+ type MutateSpecValue$1<T, O = any> = ((item: T, index: number, array: Iterable<T>) => O) | NonFunctionValue;
146
+ type MutateSpec<T> = Record<Key, MutateSpecValue$1<T>>;
147
+ type ResolvedObj$1<Obj extends Record<Key, MutateSpecValue$1<any>>> = {
131
148
  [K in keyof Obj]: Obj[K] extends (...args: any) => any ? ReturnType<Obj[K]> extends any[] ? ReturnType<Obj[K]>[number] : ReturnType<Obj[K]> : Obj[K];
132
149
  };
133
- declare type Mutated<T extends object, MSpec extends MutateSpec<T>> = O.Merge<ResolvedObj<MSpec>, T>;
134
- declare type Compute<T> = A.Compute<T>;
150
+ type Mutated$1<T extends object, MSpec extends MutateSpec<T>> = Merge<ResolvedObj$1<MSpec>, T>;
151
+ type Compute$1<T> = Prettify<T>;
135
152
  /**
136
153
  * Mutates items, one item at a time. For mutating across multiple items,
137
154
  * use mutateWithSummary.
138
155
  * @param mutateSpec
139
156
  */
140
- declare function mutate<T extends object, MSpec extends MutateSpec<T>>(mutateSpec: MSpec): TidyFn<T, Compute<Mutated<T, MSpec>>>;
157
+ declare function mutate<T extends object, MSpec extends MutateSpec<T>>(mutateSpec: MSpec): TidyFn<T, Compute$1<Mutated$1<T, MSpec>>>;
141
158
 
142
159
  /**
143
160
  * Adds a summarized total row
@@ -156,7 +173,7 @@ declare function totalIf<T extends object, F extends SummaryKeyFn<T>, MutSpec ex
156
173
  */
157
174
  declare function totalAt<T extends object, Keys extends (keyof T)[], F extends SummaryKeyFn<T, Keys[number]>, MutSpec extends MutateSpec<T> = MutateSpec<T>>(keys: Keys, summaryFn: F, mutateSpec: MutSpec): TidyFn<T>;
158
175
 
159
- declare type CountOptions = {
176
+ type CountOptions = {
160
177
  name?: string;
161
178
  sort?: boolean;
162
179
  wt?: string;
@@ -165,19 +182,19 @@ declare type CountOptions = {
165
182
  * Tallies the number distinct values for the specified keys and adds
166
183
  * the count as a new key (default `n`). Optionally sorts by the count.
167
184
  */
168
- declare function count<T extends object, Keys extends SingleOrArray<KeyOrFn<T>>>(groupKeys: Keys, options?: CountOptions | null | undefined): (items: T[]) => (Keys extends keyof T ? MergeFlat<Pick<T, Keys>, {
185
+ declare function count<T extends object, Keys extends SingleOrArray<KeyOrFn<T>>>(groupKeys: Keys, options?: CountOptions | null | undefined): (items: T[]) => ((Keys extends keyof T ? Omit<{
169
186
  n: number;
170
- }, BuiltInObject, never> : Keys extends (keyof T)[] ? MergeFlat<Pick<T, Keys[number]>, {
187
+ }, Keys> & Pick<T, Keys> extends infer T_2 ? { [K_1 in keyof T_2]: T_2[K_1]; } : never : Keys extends (keyof T)[] ? Omit<{
171
188
  n: number;
172
- }, BuiltInObject, never> : {
189
+ }, Keys[number]> & Pick<T, Keys[number]> extends infer T_3 ? { [K_2 in keyof T_3]: T_3[K_2]; } : never : {
173
190
  n: number;
174
- })[];
191
+ }) extends infer T_1 ? { [K in keyof T_1]: T_1[K]; } : never)[];
175
192
 
176
- declare type TallyOptions = {
193
+ type TallyOptions = {
177
194
  readonly name?: string;
178
195
  readonly wt?: string;
179
196
  };
180
- declare type TallyOutput<Options extends TallyOptions> = Options['name'] extends string ? {
197
+ type TallyOutput<Options extends TallyOptions> = Options['name'] extends string ? {
181
198
  [K in Options['name']]: number;
182
199
  } : {
183
200
  n: number;
@@ -185,18 +202,18 @@ declare type TallyOutput<Options extends TallyOptions> = Options['name'] extends
185
202
  declare function tally<T extends object, Options extends TallyOptions>(options?: Options): TidyFn<T, TallyOutput<Options>>;
186
203
 
187
204
  /** [key, values] where values could be more nested entries */
188
- declare type EntriesOutput = [any, any][];
189
- declare type EntriesObjectOutput = {
205
+ type EntriesOutput = [any, any][];
206
+ type EntriesObjectOutput = {
190
207
  key: Key;
191
208
  values: any;
192
209
  }[];
193
210
  /** nested objects: { [key]: values } */
194
- declare type ObjectOutput = Record<Key, any>;
211
+ type ObjectOutput = Record<Key, any>;
195
212
  /** nested keys: e.g. [key, key, key, [key, key, [key]]] */
196
- declare type KeysOutput = any[];
213
+ type KeysOutput = any[];
197
214
  /** nested values: e.g. [[value1_1, value1_2], [value2_1, value2_2]] */
198
- declare type ValuesOutput = any[];
199
- declare type LevelSpec = {
215
+ type ValuesOutput = any[];
216
+ type LevelSpec = {
200
217
  id?: string;
201
218
  createEmptySubgroup: () => any;
202
219
  addSubgroup: (parentGrouped: any, newSubgroup: any, key: any, level: number) => void;
@@ -235,1704 +252,127 @@ interface GroupByOptions {
235
252
  /** [required for levels] specifies the export operation for each level of the grouping */
236
253
  readonly levels?: ('entries' | 'entries-object' | 'object' | 'map' | 'keys' | 'values' | LevelSpec)[];
237
254
  }
238
- declare type GK<T extends object> = SingleOrArray<keyof T | ((d: T) => any)>;
239
- declare type F<I extends object, O extends object> = TidyFn<I, O>;
240
- declare type MergeGroupKeys<T extends object, Out extends object, Keys extends GK<T>> = Keys extends keyof T ? O.Merge<Pick<T, Keys>, Out> : Keys extends (keyof T)[] ? O.Merge<Pick<T, Keys[number]>, Out> : Out;
241
- declare type WithGroupKeys<T extends object, Out extends object, Keys extends GK<T>, Opts extends GroupByOptions> = NonNullable<Opts>['addGroupKeys'] extends false ? Out : MergeGroupKeys<T, Out, Keys>;
255
+ type GK<T extends object> = SingleOrArray<keyof T | ((d: T) => any)>;
256
+ type F<I extends object, O extends object> = TidyFn<I, O>;
257
+ type MergeGroupKeys<T extends object, Out extends object, Keys extends GK<T>> = Keys extends keyof T ? Merge<Pick<T, Keys>, Out> : Keys extends (keyof T)[] ? Merge<Pick<T, Keys[number]>, Out> : Out;
258
+ type WithGroupKeys<T extends object, Out extends object, Keys extends GK<T>, Opts extends GroupByOptions> = NonNullable<Opts>['addGroupKeys'] extends false ? Out : MergeGroupKeys<T, Out, Keys>;
242
259
  /**
243
260
  * output varies based on export options
244
261
  */
245
- declare type GroupByOutput<T extends object, O extends object, Keys extends GK<T>, Opts extends GroupByOptions> = A.Compute<NonNullable<Opts>['export'] extends 'grouped' ? Grouped<WithGroupKeys<T, O, Keys, Opts>> : NonNullable<Opts>['export'] extends 'entries' ? EntriesOutput : NonNullable<Opts>['export'] extends 'entries-object' ? EntriesObjectOutput : NonNullable<Opts>['export'] extends 'object' ? ObjectOutput : NonNullable<Opts>['export'] extends 'map' ? Map<any, any> : NonNullable<Opts>['export'] extends 'keys' ? KeysOutput : NonNullable<Opts>['export'] extends 'values' ? ValuesOutput : NonNullable<Opts>['export'] extends 'levels' ? any : WithGroupKeys<T, O, Keys, Opts>[]>;
246
- declare type GroupByFn<T extends object, O extends object, Keys extends GK<T>, Opts extends GroupByOptions> = Opts['export'] extends 'grouped' | 'entries' | 'entries-object' | 'object' | 'map' | 'keys' | 'values' | 'levels' ? TidyGroupExportFn<T, GroupByOutput<T, O, Keys, Opts>> : TidyFn<T, WithGroupKeys<T, O, Keys, Opts>>;
262
+ type GroupByOutput<T extends object, O extends object, Keys extends GK<T>, Opts extends GroupByOptions> = Prettify<NonNullable<Opts>['export'] extends 'grouped' ? Grouped<WithGroupKeys<T, O, Keys, Opts>> : NonNullable<Opts>['export'] extends 'entries' ? EntriesOutput : NonNullable<Opts>['export'] extends 'entries-object' ? EntriesObjectOutput : NonNullable<Opts>['export'] extends 'object' ? ObjectOutput : NonNullable<Opts>['export'] extends 'map' ? Map<any, any> : NonNullable<Opts>['export'] extends 'keys' ? KeysOutput : NonNullable<Opts>['export'] extends 'values' ? ValuesOutput : NonNullable<Opts>['export'] extends 'levels' ? any : WithGroupKeys<T, O, Keys, Opts>[]>;
263
+ type GroupByFn<T extends object, O extends object, Keys extends GK<T>, Opts extends GroupByOptions> = Opts['export'] extends 'grouped' | 'entries' | 'entries-object' | 'object' | 'map' | 'keys' | 'values' | 'levels' ? TidyGroupExportFn<T, GroupByOutput<T, O, Keys, Opts>> : TidyFn<T, Prettify<WithGroupKeys<T, O, Keys, Opts>>>;
247
264
  /**
248
265
  * Nests the data by the specified groupings
249
266
  */
250
- declare function groupBy<T extends object, T1 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: F<T, T1>, options: Opts): GroupByFn<T, T1, Keys, Opts>;
251
- declare namespace groupBy {
252
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
253
- readonly export: "grouped";
254
- readonly flat?: boolean | undefined;
255
- readonly addGroupKeys?: boolean | undefined;
256
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
257
- readonly single?: boolean | undefined;
258
- readonly mapLeaf?: ((value: any) => any) | undefined;
259
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
260
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
261
- };
262
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
263
- readonly export: "entries";
264
- readonly flat?: boolean | undefined;
265
- readonly addGroupKeys?: boolean | undefined;
266
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
267
- readonly single?: boolean | undefined;
268
- readonly mapLeaf?: ((value: any) => any) | undefined;
269
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
270
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
271
- };
272
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
273
- readonly export: "entries-object";
274
- readonly flat?: boolean | undefined;
275
- readonly addGroupKeys?: boolean | undefined;
276
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
277
- readonly single?: boolean | undefined;
278
- readonly mapLeaf?: ((value: any) => any) | undefined;
279
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
280
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
281
- };
282
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
283
- readonly export: "object";
284
- readonly flat?: boolean | undefined;
285
- readonly addGroupKeys?: boolean | undefined;
286
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
287
- readonly single?: boolean | undefined;
288
- readonly mapLeaf?: ((value: any) => any) | undefined;
289
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
290
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
291
- };
292
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
293
- readonly export: "map";
294
- readonly flat?: boolean | undefined;
295
- readonly addGroupKeys?: boolean | undefined;
296
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
297
- readonly single?: boolean | undefined;
298
- readonly mapLeaf?: ((value: any) => any) | undefined;
299
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
300
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
301
- };
302
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
303
- readonly export: "keys";
304
- readonly flat?: boolean | undefined;
305
- readonly addGroupKeys?: boolean | undefined;
306
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
307
- readonly single?: boolean | undefined;
308
- readonly mapLeaf?: ((value: any) => any) | undefined;
309
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
310
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
311
- };
312
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
313
- readonly export: "values";
314
- readonly flat?: boolean | undefined;
315
- readonly addGroupKeys?: boolean | undefined;
316
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
317
- readonly single?: boolean | undefined;
318
- readonly mapLeaf?: ((value: any) => any) | undefined;
319
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
320
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
321
- };
322
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
323
- readonly export: "levels";
324
- readonly flat?: boolean | undefined;
325
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
326
- readonly addGroupKeys?: boolean | undefined;
327
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
328
- readonly single?: boolean | undefined;
329
- readonly mapLeaf?: ((value: any) => any) | undefined;
330
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
331
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
332
- };
333
- }
334
- declare function groupBy<T extends object, T1 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: F<T, T1>): GroupByFn<T, T1, Keys, GroupByOptions>;
335
- declare namespace groupBy {
336
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
337
- readonly export: "grouped";
338
- readonly flat?: boolean | undefined;
339
- readonly addGroupKeys?: boolean | undefined;
340
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
341
- readonly single?: boolean | undefined;
342
- readonly mapLeaf?: ((value: any) => any) | undefined;
343
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
344
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
345
- };
346
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
347
- readonly export: "entries";
348
- readonly flat?: boolean | undefined;
349
- readonly addGroupKeys?: boolean | undefined;
350
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
351
- readonly single?: boolean | undefined;
352
- readonly mapLeaf?: ((value: any) => any) | undefined;
353
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
354
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
355
- };
356
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
357
- readonly export: "entries-object";
358
- readonly flat?: boolean | undefined;
359
- readonly addGroupKeys?: boolean | undefined;
360
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
361
- readonly single?: boolean | undefined;
362
- readonly mapLeaf?: ((value: any) => any) | undefined;
363
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
364
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
365
- };
366
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
367
- readonly export: "object";
368
- readonly flat?: boolean | undefined;
369
- readonly addGroupKeys?: boolean | undefined;
370
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
371
- readonly single?: boolean | undefined;
372
- readonly mapLeaf?: ((value: any) => any) | undefined;
373
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
374
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
375
- };
376
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
377
- readonly export: "map";
378
- readonly flat?: boolean | undefined;
379
- readonly addGroupKeys?: boolean | undefined;
380
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
381
- readonly single?: boolean | undefined;
382
- readonly mapLeaf?: ((value: any) => any) | undefined;
383
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
384
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
385
- };
386
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
387
- readonly export: "keys";
388
- readonly flat?: boolean | undefined;
389
- readonly addGroupKeys?: boolean | undefined;
390
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
391
- readonly single?: boolean | undefined;
392
- readonly mapLeaf?: ((value: any) => any) | undefined;
393
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
394
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
395
- };
396
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
397
- readonly export: "values";
398
- readonly flat?: boolean | undefined;
399
- readonly addGroupKeys?: boolean | undefined;
400
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
401
- readonly single?: boolean | undefined;
402
- readonly mapLeaf?: ((value: any) => any) | undefined;
403
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
404
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
405
- };
406
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
407
- readonly export: "levels";
408
- readonly flat?: boolean | undefined;
409
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
410
- readonly addGroupKeys?: boolean | undefined;
411
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
412
- readonly single?: boolean | undefined;
413
- readonly mapLeaf?: ((value: any) => any) | undefined;
414
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
415
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
416
- };
417
- }
418
- declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, T7 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>, F<T6, T7>], options: Opts): GroupByFn<T, T7, Keys, Opts>;
419
- declare namespace groupBy {
420
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
421
- readonly export: "grouped";
422
- readonly flat?: boolean | undefined;
423
- readonly addGroupKeys?: boolean | undefined;
424
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
425
- readonly single?: boolean | undefined;
426
- readonly mapLeaf?: ((value: any) => any) | undefined;
427
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
428
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
429
- };
430
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
431
- readonly export: "entries";
432
- readonly flat?: boolean | undefined;
433
- readonly addGroupKeys?: boolean | undefined;
434
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
435
- readonly single?: boolean | undefined;
436
- readonly mapLeaf?: ((value: any) => any) | undefined;
437
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
438
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
439
- };
440
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
441
- readonly export: "entries-object";
442
- readonly flat?: boolean | undefined;
443
- readonly addGroupKeys?: boolean | undefined;
444
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
445
- readonly single?: boolean | undefined;
446
- readonly mapLeaf?: ((value: any) => any) | undefined;
447
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
448
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
449
- };
450
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
451
- readonly export: "object";
452
- readonly flat?: boolean | undefined;
453
- readonly addGroupKeys?: boolean | undefined;
454
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
455
- readonly single?: boolean | undefined;
456
- readonly mapLeaf?: ((value: any) => any) | undefined;
457
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
458
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
459
- };
460
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
461
- readonly export: "map";
462
- readonly flat?: boolean | undefined;
463
- readonly addGroupKeys?: boolean | undefined;
464
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
465
- readonly single?: boolean | undefined;
466
- readonly mapLeaf?: ((value: any) => any) | undefined;
467
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
468
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
469
- };
470
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
471
- readonly export: "keys";
472
- readonly flat?: boolean | undefined;
473
- readonly addGroupKeys?: boolean | undefined;
474
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
475
- readonly single?: boolean | undefined;
476
- readonly mapLeaf?: ((value: any) => any) | undefined;
477
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
478
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
479
- };
480
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
481
- readonly export: "values";
482
- readonly flat?: boolean | undefined;
483
- readonly addGroupKeys?: boolean | undefined;
484
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
485
- readonly single?: boolean | undefined;
486
- readonly mapLeaf?: ((value: any) => any) | undefined;
487
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
488
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
489
- };
490
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
491
- readonly export: "levels";
492
- readonly flat?: boolean | undefined;
493
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
494
- readonly addGroupKeys?: boolean | undefined;
495
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
496
- readonly single?: boolean | undefined;
497
- readonly mapLeaf?: ((value: any) => any) | undefined;
498
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
499
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
500
- };
501
- }
502
- declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, T7 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>, F<T6, T7>]): GroupByFn<T, T7, Keys, GroupByOptions>;
503
- declare namespace groupBy {
504
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
505
- readonly export: "grouped";
506
- readonly flat?: boolean | undefined;
507
- readonly addGroupKeys?: boolean | undefined;
508
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
509
- readonly single?: boolean | undefined;
510
- readonly mapLeaf?: ((value: any) => any) | undefined;
511
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
512
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
513
- };
514
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
515
- readonly export: "entries";
516
- readonly flat?: boolean | undefined;
517
- readonly addGroupKeys?: boolean | undefined;
518
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
519
- readonly single?: boolean | undefined;
520
- readonly mapLeaf?: ((value: any) => any) | undefined;
521
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
522
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
523
- };
524
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
525
- readonly export: "entries-object";
526
- readonly flat?: boolean | undefined;
527
- readonly addGroupKeys?: boolean | undefined;
528
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
529
- readonly single?: boolean | undefined;
530
- readonly mapLeaf?: ((value: any) => any) | undefined;
531
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
532
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
533
- };
534
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
535
- readonly export: "object";
536
- readonly flat?: boolean | undefined;
537
- readonly addGroupKeys?: boolean | undefined;
538
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
539
- readonly single?: boolean | undefined;
540
- readonly mapLeaf?: ((value: any) => any) | undefined;
541
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
542
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
543
- };
544
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
545
- readonly export: "map";
546
- readonly flat?: boolean | undefined;
547
- readonly addGroupKeys?: boolean | undefined;
548
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
549
- readonly single?: boolean | undefined;
550
- readonly mapLeaf?: ((value: any) => any) | undefined;
551
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
552
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
553
- };
554
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
555
- readonly export: "keys";
556
- readonly flat?: boolean | undefined;
557
- readonly addGroupKeys?: boolean | undefined;
558
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
559
- readonly single?: boolean | undefined;
560
- readonly mapLeaf?: ((value: any) => any) | undefined;
561
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
562
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
563
- };
564
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
565
- readonly export: "values";
566
- readonly flat?: boolean | undefined;
567
- readonly addGroupKeys?: boolean | undefined;
568
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
569
- readonly single?: boolean | undefined;
570
- readonly mapLeaf?: ((value: any) => any) | undefined;
571
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
572
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
573
- };
574
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
575
- readonly export: "levels";
576
- readonly flat?: boolean | undefined;
577
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
578
- readonly addGroupKeys?: boolean | undefined;
579
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
580
- readonly single?: boolean | undefined;
581
- readonly mapLeaf?: ((value: any) => any) | undefined;
582
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
583
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
584
- };
585
- }
586
- declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>], options: Opts): GroupByFn<T, T6, Keys, Opts>;
587
- declare namespace groupBy {
588
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
589
- readonly export: "grouped";
590
- readonly flat?: boolean | undefined;
591
- readonly addGroupKeys?: boolean | undefined;
592
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
593
- readonly single?: boolean | undefined;
594
- readonly mapLeaf?: ((value: any) => any) | undefined;
595
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
596
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
597
- };
598
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
599
- readonly export: "entries";
600
- readonly flat?: boolean | undefined;
601
- readonly addGroupKeys?: boolean | undefined;
602
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
603
- readonly single?: boolean | undefined;
604
- readonly mapLeaf?: ((value: any) => any) | undefined;
605
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
606
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
607
- };
608
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
609
- readonly export: "entries-object";
610
- readonly flat?: boolean | undefined;
611
- readonly addGroupKeys?: boolean | undefined;
612
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
613
- readonly single?: boolean | undefined;
614
- readonly mapLeaf?: ((value: any) => any) | undefined;
615
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
616
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
617
- };
618
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
619
- readonly export: "object";
620
- readonly flat?: boolean | undefined;
621
- readonly addGroupKeys?: boolean | undefined;
622
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
623
- readonly single?: boolean | undefined;
624
- readonly mapLeaf?: ((value: any) => any) | undefined;
625
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
626
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
627
- };
628
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
629
- readonly export: "map";
630
- readonly flat?: boolean | undefined;
631
- readonly addGroupKeys?: boolean | undefined;
632
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
633
- readonly single?: boolean | undefined;
634
- readonly mapLeaf?: ((value: any) => any) | undefined;
635
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
636
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
637
- };
638
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
639
- readonly export: "keys";
640
- readonly flat?: boolean | undefined;
641
- readonly addGroupKeys?: boolean | undefined;
642
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
643
- readonly single?: boolean | undefined;
644
- readonly mapLeaf?: ((value: any) => any) | undefined;
645
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
646
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
647
- };
648
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
649
- readonly export: "values";
650
- readonly flat?: boolean | undefined;
651
- readonly addGroupKeys?: boolean | undefined;
652
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
653
- readonly single?: boolean | undefined;
654
- readonly mapLeaf?: ((value: any) => any) | undefined;
655
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
656
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
657
- };
658
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
659
- readonly export: "levels";
660
- readonly flat?: boolean | undefined;
661
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
662
- readonly addGroupKeys?: boolean | undefined;
663
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
664
- readonly single?: boolean | undefined;
665
- readonly mapLeaf?: ((value: any) => any) | undefined;
666
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
667
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
668
- };
669
- }
670
- declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>]): GroupByFn<T, T6, Keys, GroupByOptions>;
671
- declare namespace groupBy {
672
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
673
- readonly export: "grouped";
674
- readonly flat?: boolean | undefined;
675
- readonly addGroupKeys?: boolean | undefined;
676
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
677
- readonly single?: boolean | undefined;
678
- readonly mapLeaf?: ((value: any) => any) | undefined;
679
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
680
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
681
- };
682
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
683
- readonly export: "entries";
684
- readonly flat?: boolean | undefined;
685
- readonly addGroupKeys?: boolean | undefined;
686
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
687
- readonly single?: boolean | undefined;
688
- readonly mapLeaf?: ((value: any) => any) | undefined;
689
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
690
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
691
- };
692
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
693
- readonly export: "entries-object";
694
- readonly flat?: boolean | undefined;
695
- readonly addGroupKeys?: boolean | undefined;
696
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
697
- readonly single?: boolean | undefined;
698
- readonly mapLeaf?: ((value: any) => any) | undefined;
699
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
700
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
701
- };
702
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
703
- readonly export: "object";
704
- readonly flat?: boolean | undefined;
705
- readonly addGroupKeys?: boolean | undefined;
706
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
707
- readonly single?: boolean | undefined;
708
- readonly mapLeaf?: ((value: any) => any) | undefined;
709
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
710
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
711
- };
712
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
713
- readonly export: "map";
714
- readonly flat?: boolean | undefined;
715
- readonly addGroupKeys?: boolean | undefined;
716
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
717
- readonly single?: boolean | undefined;
718
- readonly mapLeaf?: ((value: any) => any) | undefined;
719
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
720
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
721
- };
722
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
723
- readonly export: "keys";
724
- readonly flat?: boolean | undefined;
725
- readonly addGroupKeys?: boolean | undefined;
726
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
727
- readonly single?: boolean | undefined;
728
- readonly mapLeaf?: ((value: any) => any) | undefined;
729
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
730
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
731
- };
732
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
733
- readonly export: "values";
734
- readonly flat?: boolean | undefined;
735
- readonly addGroupKeys?: boolean | undefined;
736
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
737
- readonly single?: boolean | undefined;
738
- readonly mapLeaf?: ((value: any) => any) | undefined;
739
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
740
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
741
- };
742
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
743
- readonly export: "levels";
744
- readonly flat?: boolean | undefined;
745
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
746
- readonly addGroupKeys?: boolean | undefined;
747
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
748
- readonly single?: boolean | undefined;
749
- readonly mapLeaf?: ((value: any) => any) | undefined;
750
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
751
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
752
- };
753
- }
754
- declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>], options: Opts): GroupByFn<T, T5, Keys, Opts>;
755
- declare namespace groupBy {
756
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
757
- readonly export: "grouped";
758
- readonly flat?: boolean | undefined;
759
- readonly addGroupKeys?: boolean | undefined;
760
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
761
- readonly single?: boolean | undefined;
762
- readonly mapLeaf?: ((value: any) => any) | undefined;
763
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
764
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
765
- };
766
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
767
- readonly export: "entries";
768
- readonly flat?: boolean | undefined;
769
- readonly addGroupKeys?: boolean | undefined;
770
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
771
- readonly single?: boolean | undefined;
772
- readonly mapLeaf?: ((value: any) => any) | undefined;
773
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
774
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
775
- };
776
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
777
- readonly export: "entries-object";
778
- readonly flat?: boolean | undefined;
779
- readonly addGroupKeys?: boolean | undefined;
780
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
781
- readonly single?: boolean | undefined;
782
- readonly mapLeaf?: ((value: any) => any) | undefined;
783
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
784
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
785
- };
786
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
787
- readonly export: "object";
788
- readonly flat?: boolean | undefined;
789
- readonly addGroupKeys?: boolean | undefined;
790
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
791
- readonly single?: boolean | undefined;
792
- readonly mapLeaf?: ((value: any) => any) | undefined;
793
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
794
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
795
- };
796
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
797
- readonly export: "map";
798
- readonly flat?: boolean | undefined;
799
- readonly addGroupKeys?: boolean | undefined;
800
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
801
- readonly single?: boolean | undefined;
802
- readonly mapLeaf?: ((value: any) => any) | undefined;
803
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
804
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
805
- };
806
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
807
- readonly export: "keys";
808
- readonly flat?: boolean | undefined;
809
- readonly addGroupKeys?: boolean | undefined;
810
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
811
- readonly single?: boolean | undefined;
812
- readonly mapLeaf?: ((value: any) => any) | undefined;
813
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
814
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
815
- };
816
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
817
- readonly export: "values";
818
- readonly flat?: boolean | undefined;
819
- readonly addGroupKeys?: boolean | undefined;
820
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
821
- readonly single?: boolean | undefined;
822
- readonly mapLeaf?: ((value: any) => any) | undefined;
823
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
824
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
825
- };
826
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
827
- readonly export: "levels";
828
- readonly flat?: boolean | undefined;
829
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
830
- readonly addGroupKeys?: boolean | undefined;
831
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
832
- readonly single?: boolean | undefined;
833
- readonly mapLeaf?: ((value: any) => any) | undefined;
834
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
835
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
836
- };
837
- }
838
- declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>]): GroupByFn<T, T5, Keys, GroupByOptions>;
839
- declare namespace groupBy {
840
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
841
- readonly export: "grouped";
842
- readonly flat?: boolean | undefined;
843
- readonly addGroupKeys?: boolean | undefined;
844
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
845
- readonly single?: boolean | undefined;
846
- readonly mapLeaf?: ((value: any) => any) | undefined;
847
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
848
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
849
- };
850
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
851
- readonly export: "entries";
852
- readonly flat?: boolean | undefined;
853
- readonly addGroupKeys?: boolean | undefined;
854
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
855
- readonly single?: boolean | undefined;
856
- readonly mapLeaf?: ((value: any) => any) | undefined;
857
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
858
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
859
- };
860
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
861
- readonly export: "entries-object";
862
- readonly flat?: boolean | undefined;
863
- readonly addGroupKeys?: boolean | undefined;
864
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
865
- readonly single?: boolean | undefined;
866
- readonly mapLeaf?: ((value: any) => any) | undefined;
867
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
868
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
869
- };
870
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
871
- readonly export: "object";
872
- readonly flat?: boolean | undefined;
873
- readonly addGroupKeys?: boolean | undefined;
874
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
875
- readonly single?: boolean | undefined;
876
- readonly mapLeaf?: ((value: any) => any) | undefined;
877
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
878
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
879
- };
880
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
881
- readonly export: "map";
882
- readonly flat?: boolean | undefined;
883
- readonly addGroupKeys?: boolean | undefined;
884
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
885
- readonly single?: boolean | undefined;
886
- readonly mapLeaf?: ((value: any) => any) | undefined;
887
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
888
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
889
- };
890
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
891
- readonly export: "keys";
892
- readonly flat?: boolean | undefined;
893
- readonly addGroupKeys?: boolean | undefined;
894
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
895
- readonly single?: boolean | undefined;
896
- readonly mapLeaf?: ((value: any) => any) | undefined;
897
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
898
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
899
- };
900
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
901
- readonly export: "values";
902
- readonly flat?: boolean | undefined;
903
- readonly addGroupKeys?: boolean | undefined;
904
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
905
- readonly single?: boolean | undefined;
906
- readonly mapLeaf?: ((value: any) => any) | undefined;
907
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
908
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
909
- };
910
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
911
- readonly export: "levels";
912
- readonly flat?: boolean | undefined;
913
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
914
- readonly addGroupKeys?: boolean | undefined;
915
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
916
- readonly single?: boolean | undefined;
917
- readonly mapLeaf?: ((value: any) => any) | undefined;
918
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
919
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
920
- };
921
- }
922
- declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>], options: Opts): GroupByFn<T, T4, Keys, Opts>;
923
- declare namespace groupBy {
924
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
925
- readonly export: "grouped";
926
- readonly flat?: boolean | undefined;
927
- readonly addGroupKeys?: boolean | undefined;
928
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
929
- readonly single?: boolean | undefined;
930
- readonly mapLeaf?: ((value: any) => any) | undefined;
931
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
932
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
933
- };
934
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
935
- readonly export: "entries";
936
- readonly flat?: boolean | undefined;
937
- readonly addGroupKeys?: boolean | undefined;
938
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
939
- readonly single?: boolean | undefined;
940
- readonly mapLeaf?: ((value: any) => any) | undefined;
941
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
942
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
943
- };
944
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
945
- readonly export: "entries-object";
946
- readonly flat?: boolean | undefined;
947
- readonly addGroupKeys?: boolean | undefined;
948
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
949
- readonly single?: boolean | undefined;
950
- readonly mapLeaf?: ((value: any) => any) | undefined;
951
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
952
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
953
- };
954
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
955
- readonly export: "object";
956
- readonly flat?: boolean | undefined;
957
- readonly addGroupKeys?: boolean | undefined;
958
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
959
- readonly single?: boolean | undefined;
960
- readonly mapLeaf?: ((value: any) => any) | undefined;
961
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
962
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
963
- };
964
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
965
- readonly export: "map";
966
- readonly flat?: boolean | undefined;
967
- readonly addGroupKeys?: boolean | undefined;
968
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
969
- readonly single?: boolean | undefined;
970
- readonly mapLeaf?: ((value: any) => any) | undefined;
971
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
972
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
973
- };
974
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
975
- readonly export: "keys";
976
- readonly flat?: boolean | undefined;
977
- readonly addGroupKeys?: boolean | undefined;
978
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
979
- readonly single?: boolean | undefined;
980
- readonly mapLeaf?: ((value: any) => any) | undefined;
981
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
982
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
983
- };
984
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
985
- readonly export: "values";
986
- readonly flat?: boolean | undefined;
987
- readonly addGroupKeys?: boolean | undefined;
988
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
989
- readonly single?: boolean | undefined;
990
- readonly mapLeaf?: ((value: any) => any) | undefined;
991
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
992
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
993
- };
994
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
995
- readonly export: "levels";
996
- readonly flat?: boolean | undefined;
997
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
998
- readonly addGroupKeys?: boolean | undefined;
999
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1000
- readonly single?: boolean | undefined;
1001
- readonly mapLeaf?: ((value: any) => any) | undefined;
1002
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1003
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1004
- };
1005
- }
1006
- declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>]): GroupByFn<T, T4, Keys, GroupByOptions>;
1007
- declare namespace groupBy {
1008
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1009
- readonly export: "grouped";
1010
- readonly flat?: boolean | undefined;
1011
- readonly addGroupKeys?: boolean | undefined;
1012
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1013
- readonly single?: boolean | undefined;
1014
- readonly mapLeaf?: ((value: any) => any) | undefined;
1015
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1016
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1017
- };
1018
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1019
- readonly export: "entries";
1020
- readonly flat?: boolean | undefined;
1021
- readonly addGroupKeys?: boolean | undefined;
1022
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1023
- readonly single?: boolean | undefined;
1024
- readonly mapLeaf?: ((value: any) => any) | undefined;
1025
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1026
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1027
- };
1028
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1029
- readonly export: "entries-object";
1030
- readonly flat?: boolean | undefined;
1031
- readonly addGroupKeys?: boolean | undefined;
1032
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1033
- readonly single?: boolean | undefined;
1034
- readonly mapLeaf?: ((value: any) => any) | undefined;
1035
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1036
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1037
- };
1038
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1039
- readonly export: "object";
1040
- readonly flat?: boolean | undefined;
1041
- readonly addGroupKeys?: boolean | undefined;
1042
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1043
- readonly single?: boolean | undefined;
1044
- readonly mapLeaf?: ((value: any) => any) | undefined;
1045
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1046
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1047
- };
1048
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1049
- readonly export: "map";
1050
- readonly flat?: boolean | undefined;
1051
- readonly addGroupKeys?: boolean | undefined;
1052
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1053
- readonly single?: boolean | undefined;
1054
- readonly mapLeaf?: ((value: any) => any) | undefined;
1055
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1056
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1057
- };
1058
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1059
- readonly export: "keys";
1060
- readonly flat?: boolean | undefined;
1061
- readonly addGroupKeys?: boolean | undefined;
1062
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1063
- readonly single?: boolean | undefined;
1064
- readonly mapLeaf?: ((value: any) => any) | undefined;
1065
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1066
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1067
- };
1068
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1069
- readonly export: "values";
1070
- readonly flat?: boolean | undefined;
1071
- readonly addGroupKeys?: boolean | undefined;
1072
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1073
- readonly single?: boolean | undefined;
1074
- readonly mapLeaf?: ((value: any) => any) | undefined;
1075
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1076
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1077
- };
1078
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
1079
- readonly export: "levels";
1080
- readonly flat?: boolean | undefined;
1081
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1082
- readonly addGroupKeys?: boolean | undefined;
1083
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1084
- readonly single?: boolean | undefined;
1085
- readonly mapLeaf?: ((value: any) => any) | undefined;
1086
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1087
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1088
- };
1089
- }
1090
- declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>], options: Opts): GroupByFn<T, T3, Keys, Opts>;
1091
- declare namespace groupBy {
1092
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1093
- readonly export: "grouped";
1094
- readonly flat?: boolean | undefined;
1095
- readonly addGroupKeys?: boolean | undefined;
1096
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1097
- readonly single?: boolean | undefined;
1098
- readonly mapLeaf?: ((value: any) => any) | undefined;
1099
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1100
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1101
- };
1102
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1103
- readonly export: "entries";
1104
- readonly flat?: boolean | undefined;
1105
- readonly addGroupKeys?: boolean | undefined;
1106
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1107
- readonly single?: boolean | undefined;
1108
- readonly mapLeaf?: ((value: any) => any) | undefined;
1109
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1110
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1111
- };
1112
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1113
- readonly export: "entries-object";
1114
- readonly flat?: boolean | undefined;
1115
- readonly addGroupKeys?: boolean | undefined;
1116
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1117
- readonly single?: boolean | undefined;
1118
- readonly mapLeaf?: ((value: any) => any) | undefined;
1119
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1120
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1121
- };
1122
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1123
- readonly export: "object";
1124
- readonly flat?: boolean | undefined;
1125
- readonly addGroupKeys?: boolean | undefined;
1126
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1127
- readonly single?: boolean | undefined;
1128
- readonly mapLeaf?: ((value: any) => any) | undefined;
1129
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1130
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1131
- };
1132
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1133
- readonly export: "map";
1134
- readonly flat?: boolean | undefined;
1135
- readonly addGroupKeys?: boolean | undefined;
1136
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1137
- readonly single?: boolean | undefined;
1138
- readonly mapLeaf?: ((value: any) => any) | undefined;
1139
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1140
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1141
- };
1142
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1143
- readonly export: "keys";
1144
- readonly flat?: boolean | undefined;
1145
- readonly addGroupKeys?: boolean | undefined;
1146
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1147
- readonly single?: boolean | undefined;
1148
- readonly mapLeaf?: ((value: any) => any) | undefined;
1149
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1150
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1151
- };
1152
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1153
- readonly export: "values";
1154
- readonly flat?: boolean | undefined;
1155
- readonly addGroupKeys?: boolean | undefined;
1156
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1157
- readonly single?: boolean | undefined;
1158
- readonly mapLeaf?: ((value: any) => any) | undefined;
1159
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1160
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1161
- };
1162
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
1163
- readonly export: "levels";
1164
- readonly flat?: boolean | undefined;
1165
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1166
- readonly addGroupKeys?: boolean | undefined;
1167
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1168
- readonly single?: boolean | undefined;
1169
- readonly mapLeaf?: ((value: any) => any) | undefined;
1170
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1171
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1172
- };
1173
- }
1174
- declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>]): GroupByFn<T, T3, Keys, GroupByOptions>;
267
+ declare function groupBy<T extends object, T1 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: F<T, T1>, options: Opts): GroupByFn<T, T1, Keys, Opts>;
268
+ declare function groupBy<T extends object, T1 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: F<T, T1>): GroupByFn<T, T1, Keys, GroupByOptions>;
269
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, T7 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>, F<T6, T7>], options: Opts): GroupByFn<T, T7, Keys, Opts>;
270
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, T7 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>, F<T6, T7>]): GroupByFn<T, T7, Keys, GroupByOptions>;
271
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>], options: Opts): GroupByFn<T, T6, Keys, Opts>;
272
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, T6 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>, F<T5, T6>]): GroupByFn<T, T6, Keys, GroupByOptions>;
273
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>], options: Opts): GroupByFn<T, T5, Keys, Opts>;
274
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, T5 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>, F<T4, T5>]): GroupByFn<T, T5, Keys, GroupByOptions>;
275
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>], options: Opts): GroupByFn<T, T4, Keys, Opts>;
276
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, T4 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>, F<T3, T4>]): GroupByFn<T, T4, Keys, GroupByOptions>;
277
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>], options: Opts): GroupByFn<T, T3, Keys, Opts>;
278
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, T3 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>, F<T2, T3>]): GroupByFn<T, T3, Keys, GroupByOptions>;
279
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>], options: Opts): GroupByFn<T, T2, Keys, Opts>;
280
+ declare function groupBy<T extends object, T1 extends object, T2 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>]): GroupByFn<T, T2, Keys, GroupByOptions>;
281
+ declare function groupBy<T extends object, T1 extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>], options: Opts): GroupByFn<T, T1, Keys, Opts>;
282
+ declare function groupBy<T extends object, T1 extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>]): GroupByFn<T, T1, Keys, GroupByOptions>;
283
+ declare function groupBy<T extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [], options: Opts): GroupByFn<T, T, Keys, Opts>;
284
+ declare function groupBy<T extends object, const Keys extends GK<T>>(groupKeys: Keys, fns: []): GroupByFn<T, T, Keys, GroupByOptions>;
285
+ declare function groupBy<T extends object, const Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, options: Opts): GroupByFn<T, T, Keys, Opts>;
286
+ declare function groupBy<T extends object, const Keys extends GK<T>>(groupKeys: Keys): GroupByFn<T, T, Keys, GroupByOptions>;
1175
287
  declare namespace groupBy {
1176
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
288
+ var grouped: (options?: Omit<GroupByOptions, "export" | "levels">) => {
1177
289
  readonly export: "grouped";
1178
- readonly flat?: boolean | undefined;
1179
- readonly addGroupKeys?: boolean | undefined;
1180
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1181
- readonly single?: boolean | undefined;
1182
- readonly mapLeaf?: ((value: any) => any) | undefined;
1183
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1184
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1185
- };
1186
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
290
+ readonly addGroupKeys?: boolean;
291
+ readonly flat?: boolean;
292
+ readonly compositeKey?: (keys: any[]) => string;
293
+ readonly single?: boolean;
294
+ readonly mapLeaf?: (value: any) => any;
295
+ readonly mapLeaves?: (values: any[]) => any;
296
+ readonly mapEntry?: (entry: [any, any], level: number) => any;
297
+ };
298
+ var entries: (options?: Omit<GroupByOptions, "export" | "levels">) => {
1187
299
  readonly export: "entries";
1188
- readonly flat?: boolean | undefined;
1189
- readonly addGroupKeys?: boolean | undefined;
1190
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1191
- readonly single?: boolean | undefined;
1192
- readonly mapLeaf?: ((value: any) => any) | undefined;
1193
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1194
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1195
- };
1196
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
300
+ readonly addGroupKeys?: boolean;
301
+ readonly flat?: boolean;
302
+ readonly compositeKey?: (keys: any[]) => string;
303
+ readonly single?: boolean;
304
+ readonly mapLeaf?: (value: any) => any;
305
+ readonly mapLeaves?: (values: any[]) => any;
306
+ readonly mapEntry?: (entry: [any, any], level: number) => any;
307
+ };
308
+ var entriesObject: (options?: Omit<GroupByOptions, "export" | "levels">) => {
1197
309
  readonly export: "entries-object";
1198
- readonly flat?: boolean | undefined;
1199
- readonly addGroupKeys?: boolean | undefined;
1200
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1201
- readonly single?: boolean | undefined;
1202
- readonly mapLeaf?: ((value: any) => any) | undefined;
1203
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1204
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1205
- };
1206
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
310
+ readonly addGroupKeys?: boolean;
311
+ readonly flat?: boolean;
312
+ readonly compositeKey?: (keys: any[]) => string;
313
+ readonly single?: boolean;
314
+ readonly mapLeaf?: (value: any) => any;
315
+ readonly mapLeaves?: (values: any[]) => any;
316
+ readonly mapEntry?: (entry: [any, any], level: number) => any;
317
+ };
318
+ var object: (options?: Omit<GroupByOptions, "export" | "levels">) => {
1207
319
  readonly export: "object";
1208
- readonly flat?: boolean | undefined;
1209
- readonly addGroupKeys?: boolean | undefined;
1210
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1211
- readonly single?: boolean | undefined;
1212
- readonly mapLeaf?: ((value: any) => any) | undefined;
1213
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1214
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1215
- };
1216
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
320
+ readonly addGroupKeys?: boolean;
321
+ readonly flat?: boolean;
322
+ readonly compositeKey?: (keys: any[]) => string;
323
+ readonly single?: boolean;
324
+ readonly mapLeaf?: (value: any) => any;
325
+ readonly mapLeaves?: (values: any[]) => any;
326
+ readonly mapEntry?: (entry: [any, any], level: number) => any;
327
+ };
328
+ var map: (options?: Omit<GroupByOptions, "export" | "levels">) => {
1217
329
  readonly export: "map";
1218
- readonly flat?: boolean | undefined;
1219
- readonly addGroupKeys?: boolean | undefined;
1220
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1221
- readonly single?: boolean | undefined;
1222
- readonly mapLeaf?: ((value: any) => any) | undefined;
1223
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1224
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1225
- };
1226
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
330
+ readonly addGroupKeys?: boolean;
331
+ readonly flat?: boolean;
332
+ readonly compositeKey?: (keys: any[]) => string;
333
+ readonly single?: boolean;
334
+ readonly mapLeaf?: (value: any) => any;
335
+ readonly mapLeaves?: (values: any[]) => any;
336
+ readonly mapEntry?: (entry: [any, any], level: number) => any;
337
+ };
338
+ var keys: (options?: Omit<GroupByOptions, "export" | "levels">) => {
1227
339
  readonly export: "keys";
1228
- readonly flat?: boolean | undefined;
1229
- readonly addGroupKeys?: boolean | undefined;
1230
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1231
- readonly single?: boolean | undefined;
1232
- readonly mapLeaf?: ((value: any) => any) | undefined;
1233
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1234
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1235
- };
1236
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
340
+ readonly addGroupKeys?: boolean;
341
+ readonly flat?: boolean;
342
+ readonly compositeKey?: (keys: any[]) => string;
343
+ readonly single?: boolean;
344
+ readonly mapLeaf?: (value: any) => any;
345
+ readonly mapLeaves?: (values: any[]) => any;
346
+ readonly mapEntry?: (entry: [any, any], level: number) => any;
347
+ };
348
+ var values: (options?: Omit<GroupByOptions, "export" | "levels">) => {
1237
349
  readonly export: "values";
1238
- readonly flat?: boolean | undefined;
1239
- readonly addGroupKeys?: boolean | undefined;
1240
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1241
- readonly single?: boolean | undefined;
1242
- readonly mapLeaf?: ((value: any) => any) | undefined;
1243
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1244
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1245
- };
1246
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
350
+ readonly addGroupKeys?: boolean;
351
+ readonly flat?: boolean;
352
+ readonly compositeKey?: (keys: any[]) => string;
353
+ readonly single?: boolean;
354
+ readonly mapLeaf?: (value: any) => any;
355
+ readonly mapLeaves?: (values: any[]) => any;
356
+ readonly mapEntry?: (entry: [any, any], level: number) => any;
357
+ };
358
+ var levels: (options?: Omit<GroupByOptions, "export">) => {
1247
359
  readonly export: "levels";
1248
- readonly flat?: boolean | undefined;
1249
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1250
- readonly addGroupKeys?: boolean | undefined;
1251
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1252
- readonly single?: boolean | undefined;
1253
- readonly mapLeaf?: ((value: any) => any) | undefined;
1254
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1255
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1256
- };
1257
- }
1258
- declare function groupBy<T extends object, T1 extends object, T2 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>], options: Opts): GroupByFn<T, T2, Keys, Opts>;
1259
- declare namespace groupBy {
1260
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1261
- readonly export: "grouped";
1262
- readonly flat?: boolean | undefined;
1263
- readonly addGroupKeys?: boolean | undefined;
1264
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1265
- readonly single?: boolean | undefined;
1266
- readonly mapLeaf?: ((value: any) => any) | undefined;
1267
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1268
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1269
- };
1270
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1271
- readonly export: "entries";
1272
- readonly flat?: boolean | undefined;
1273
- readonly addGroupKeys?: boolean | undefined;
1274
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1275
- readonly single?: boolean | undefined;
1276
- readonly mapLeaf?: ((value: any) => any) | undefined;
1277
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1278
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1279
- };
1280
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1281
- readonly export: "entries-object";
1282
- readonly flat?: boolean | undefined;
1283
- readonly addGroupKeys?: boolean | undefined;
1284
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1285
- readonly single?: boolean | undefined;
1286
- readonly mapLeaf?: ((value: any) => any) | undefined;
1287
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1288
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1289
- };
1290
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1291
- readonly export: "object";
1292
- readonly flat?: boolean | undefined;
1293
- readonly addGroupKeys?: boolean | undefined;
1294
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1295
- readonly single?: boolean | undefined;
1296
- readonly mapLeaf?: ((value: any) => any) | undefined;
1297
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1298
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1299
- };
1300
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1301
- readonly export: "map";
1302
- readonly flat?: boolean | undefined;
1303
- readonly addGroupKeys?: boolean | undefined;
1304
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1305
- readonly single?: boolean | undefined;
1306
- readonly mapLeaf?: ((value: any) => any) | undefined;
1307
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1308
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1309
- };
1310
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1311
- readonly export: "keys";
1312
- readonly flat?: boolean | undefined;
1313
- readonly addGroupKeys?: boolean | undefined;
1314
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1315
- readonly single?: boolean | undefined;
1316
- readonly mapLeaf?: ((value: any) => any) | undefined;
1317
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1318
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1319
- };
1320
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1321
- readonly export: "values";
1322
- readonly flat?: boolean | undefined;
1323
- readonly addGroupKeys?: boolean | undefined;
1324
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1325
- readonly single?: boolean | undefined;
1326
- readonly mapLeaf?: ((value: any) => any) | undefined;
1327
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1328
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1329
- };
1330
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
1331
- readonly export: "levels";
1332
- readonly flat?: boolean | undefined;
1333
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1334
- readonly addGroupKeys?: boolean | undefined;
1335
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1336
- readonly single?: boolean | undefined;
1337
- readonly mapLeaf?: ((value: any) => any) | undefined;
1338
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1339
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1340
- };
1341
- }
1342
- declare function groupBy<T extends object, T1 extends object, T2 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>, F<T1, T2>]): GroupByFn<T, T2, Keys, GroupByOptions>;
1343
- declare namespace groupBy {
1344
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1345
- readonly export: "grouped";
1346
- readonly flat?: boolean | undefined;
1347
- readonly addGroupKeys?: boolean | undefined;
1348
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1349
- readonly single?: boolean | undefined;
1350
- readonly mapLeaf?: ((value: any) => any) | undefined;
1351
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1352
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1353
- };
1354
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1355
- readonly export: "entries";
1356
- readonly flat?: boolean | undefined;
1357
- readonly addGroupKeys?: boolean | undefined;
1358
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1359
- readonly single?: boolean | undefined;
1360
- readonly mapLeaf?: ((value: any) => any) | undefined;
1361
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1362
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1363
- };
1364
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1365
- readonly export: "entries-object";
1366
- readonly flat?: boolean | undefined;
1367
- readonly addGroupKeys?: boolean | undefined;
1368
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1369
- readonly single?: boolean | undefined;
1370
- readonly mapLeaf?: ((value: any) => any) | undefined;
1371
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1372
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1373
- };
1374
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1375
- readonly export: "object";
1376
- readonly flat?: boolean | undefined;
1377
- readonly addGroupKeys?: boolean | undefined;
1378
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1379
- readonly single?: boolean | undefined;
1380
- readonly mapLeaf?: ((value: any) => any) | undefined;
1381
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1382
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1383
- };
1384
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1385
- readonly export: "map";
1386
- readonly flat?: boolean | undefined;
1387
- readonly addGroupKeys?: boolean | undefined;
1388
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1389
- readonly single?: boolean | undefined;
1390
- readonly mapLeaf?: ((value: any) => any) | undefined;
1391
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1392
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1393
- };
1394
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1395
- readonly export: "keys";
1396
- readonly flat?: boolean | undefined;
1397
- readonly addGroupKeys?: boolean | undefined;
1398
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1399
- readonly single?: boolean | undefined;
1400
- readonly mapLeaf?: ((value: any) => any) | undefined;
1401
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1402
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1403
- };
1404
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1405
- readonly export: "values";
1406
- readonly flat?: boolean | undefined;
1407
- readonly addGroupKeys?: boolean | undefined;
1408
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1409
- readonly single?: boolean | undefined;
1410
- readonly mapLeaf?: ((value: any) => any) | undefined;
1411
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1412
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1413
- };
1414
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
1415
- readonly export: "levels";
1416
- readonly flat?: boolean | undefined;
1417
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1418
- readonly addGroupKeys?: boolean | undefined;
1419
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1420
- readonly single?: boolean | undefined;
1421
- readonly mapLeaf?: ((value: any) => any) | undefined;
1422
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1423
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1424
- };
1425
- }
1426
- declare function groupBy<T extends object, T1 extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [F<T, T1>], options: Opts): GroupByFn<T, T1, Keys, Opts>;
1427
- declare namespace groupBy {
1428
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1429
- readonly export: "grouped";
1430
- readonly flat?: boolean | undefined;
1431
- readonly addGroupKeys?: boolean | undefined;
1432
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1433
- readonly single?: boolean | undefined;
1434
- readonly mapLeaf?: ((value: any) => any) | undefined;
1435
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1436
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1437
- };
1438
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1439
- readonly export: "entries";
1440
- readonly flat?: boolean | undefined;
1441
- readonly addGroupKeys?: boolean | undefined;
1442
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1443
- readonly single?: boolean | undefined;
1444
- readonly mapLeaf?: ((value: any) => any) | undefined;
1445
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1446
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1447
- };
1448
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1449
- readonly export: "entries-object";
1450
- readonly flat?: boolean | undefined;
1451
- readonly addGroupKeys?: boolean | undefined;
1452
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1453
- readonly single?: boolean | undefined;
1454
- readonly mapLeaf?: ((value: any) => any) | undefined;
1455
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1456
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1457
- };
1458
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1459
- readonly export: "object";
1460
- readonly flat?: boolean | undefined;
1461
- readonly addGroupKeys?: boolean | undefined;
1462
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1463
- readonly single?: boolean | undefined;
1464
- readonly mapLeaf?: ((value: any) => any) | undefined;
1465
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1466
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1467
- };
1468
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1469
- readonly export: "map";
1470
- readonly flat?: boolean | undefined;
1471
- readonly addGroupKeys?: boolean | undefined;
1472
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1473
- readonly single?: boolean | undefined;
1474
- readonly mapLeaf?: ((value: any) => any) | undefined;
1475
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1476
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1477
- };
1478
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1479
- readonly export: "keys";
1480
- readonly flat?: boolean | undefined;
1481
- readonly addGroupKeys?: boolean | undefined;
1482
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1483
- readonly single?: boolean | undefined;
1484
- readonly mapLeaf?: ((value: any) => any) | undefined;
1485
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1486
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1487
- };
1488
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1489
- readonly export: "values";
1490
- readonly flat?: boolean | undefined;
1491
- readonly addGroupKeys?: boolean | undefined;
1492
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1493
- readonly single?: boolean | undefined;
1494
- readonly mapLeaf?: ((value: any) => any) | undefined;
1495
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1496
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1497
- };
1498
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
1499
- readonly export: "levels";
1500
- readonly flat?: boolean | undefined;
1501
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1502
- readonly addGroupKeys?: boolean | undefined;
1503
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1504
- readonly single?: boolean | undefined;
1505
- readonly mapLeaf?: ((value: any) => any) | undefined;
1506
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1507
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1508
- };
1509
- }
1510
- declare function groupBy<T extends object, T1 extends object, Keys extends GK<T>>(groupKeys: Keys, fns: [F<T, T1>]): GroupByFn<T, T1, Keys, GroupByOptions>;
1511
- declare namespace groupBy {
1512
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1513
- readonly export: "grouped";
1514
- readonly flat?: boolean | undefined;
1515
- readonly addGroupKeys?: boolean | undefined;
1516
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1517
- readonly single?: boolean | undefined;
1518
- readonly mapLeaf?: ((value: any) => any) | undefined;
1519
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1520
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1521
- };
1522
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1523
- readonly export: "entries";
1524
- readonly flat?: boolean | undefined;
1525
- readonly addGroupKeys?: boolean | undefined;
1526
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1527
- readonly single?: boolean | undefined;
1528
- readonly mapLeaf?: ((value: any) => any) | undefined;
1529
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1530
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1531
- };
1532
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1533
- readonly export: "entries-object";
1534
- readonly flat?: boolean | undefined;
1535
- readonly addGroupKeys?: boolean | undefined;
1536
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1537
- readonly single?: boolean | undefined;
1538
- readonly mapLeaf?: ((value: any) => any) | undefined;
1539
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1540
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1541
- };
1542
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1543
- readonly export: "object";
1544
- readonly flat?: boolean | undefined;
1545
- readonly addGroupKeys?: boolean | undefined;
1546
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1547
- readonly single?: boolean | undefined;
1548
- readonly mapLeaf?: ((value: any) => any) | undefined;
1549
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1550
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1551
- };
1552
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1553
- readonly export: "map";
1554
- readonly flat?: boolean | undefined;
1555
- readonly addGroupKeys?: boolean | undefined;
1556
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1557
- readonly single?: boolean | undefined;
1558
- readonly mapLeaf?: ((value: any) => any) | undefined;
1559
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1560
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1561
- };
1562
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1563
- readonly export: "keys";
1564
- readonly flat?: boolean | undefined;
1565
- readonly addGroupKeys?: boolean | undefined;
1566
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1567
- readonly single?: boolean | undefined;
1568
- readonly mapLeaf?: ((value: any) => any) | undefined;
1569
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1570
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1571
- };
1572
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1573
- readonly export: "values";
1574
- readonly flat?: boolean | undefined;
1575
- readonly addGroupKeys?: boolean | undefined;
1576
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1577
- readonly single?: boolean | undefined;
1578
- readonly mapLeaf?: ((value: any) => any) | undefined;
1579
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1580
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1581
- };
1582
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
1583
- readonly export: "levels";
1584
- readonly flat?: boolean | undefined;
1585
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1586
- readonly addGroupKeys?: boolean | undefined;
1587
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1588
- readonly single?: boolean | undefined;
1589
- readonly mapLeaf?: ((value: any) => any) | undefined;
1590
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1591
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1592
- };
1593
- }
1594
- declare function groupBy<T extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, fns: [], options: Opts): GroupByFn<T, T, Keys, Opts>;
1595
- declare namespace groupBy {
1596
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1597
- readonly export: "grouped";
1598
- readonly flat?: boolean | undefined;
1599
- readonly addGroupKeys?: boolean | undefined;
1600
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1601
- readonly single?: boolean | undefined;
1602
- readonly mapLeaf?: ((value: any) => any) | undefined;
1603
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1604
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1605
- };
1606
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1607
- readonly export: "entries";
1608
- readonly flat?: boolean | undefined;
1609
- readonly addGroupKeys?: boolean | undefined;
1610
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1611
- readonly single?: boolean | undefined;
1612
- readonly mapLeaf?: ((value: any) => any) | undefined;
1613
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1614
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1615
- };
1616
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1617
- readonly export: "entries-object";
1618
- readonly flat?: boolean | undefined;
1619
- readonly addGroupKeys?: boolean | undefined;
1620
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1621
- readonly single?: boolean | undefined;
1622
- readonly mapLeaf?: ((value: any) => any) | undefined;
1623
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1624
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1625
- };
1626
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1627
- readonly export: "object";
1628
- readonly flat?: boolean | undefined;
1629
- readonly addGroupKeys?: boolean | undefined;
1630
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1631
- readonly single?: boolean | undefined;
1632
- readonly mapLeaf?: ((value: any) => any) | undefined;
1633
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1634
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1635
- };
1636
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1637
- readonly export: "map";
1638
- readonly flat?: boolean | undefined;
1639
- readonly addGroupKeys?: boolean | undefined;
1640
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1641
- readonly single?: boolean | undefined;
1642
- readonly mapLeaf?: ((value: any) => any) | undefined;
1643
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1644
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1645
- };
1646
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1647
- readonly export: "keys";
1648
- readonly flat?: boolean | undefined;
1649
- readonly addGroupKeys?: boolean | undefined;
1650
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1651
- readonly single?: boolean | undefined;
1652
- readonly mapLeaf?: ((value: any) => any) | undefined;
1653
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1654
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1655
- };
1656
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1657
- readonly export: "values";
1658
- readonly flat?: boolean | undefined;
1659
- readonly addGroupKeys?: boolean | undefined;
1660
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1661
- readonly single?: boolean | undefined;
1662
- readonly mapLeaf?: ((value: any) => any) | undefined;
1663
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1664
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1665
- };
1666
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
1667
- readonly export: "levels";
1668
- readonly flat?: boolean | undefined;
1669
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1670
- readonly addGroupKeys?: boolean | undefined;
1671
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1672
- readonly single?: boolean | undefined;
1673
- readonly mapLeaf?: ((value: any) => any) | undefined;
1674
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1675
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1676
- };
1677
- }
1678
- declare function groupBy<T extends object, Keys extends GK<T>>(groupKeys: Keys, fns: []): GroupByFn<T, T, Keys, GroupByOptions>;
1679
- declare namespace groupBy {
1680
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1681
- readonly export: "grouped";
1682
- readonly flat?: boolean | undefined;
1683
- readonly addGroupKeys?: boolean | undefined;
1684
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1685
- readonly single?: boolean | undefined;
1686
- readonly mapLeaf?: ((value: any) => any) | undefined;
1687
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1688
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1689
- };
1690
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1691
- readonly export: "entries";
1692
- readonly flat?: boolean | undefined;
1693
- readonly addGroupKeys?: boolean | undefined;
1694
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1695
- readonly single?: boolean | undefined;
1696
- readonly mapLeaf?: ((value: any) => any) | undefined;
1697
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1698
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1699
- };
1700
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1701
- readonly export: "entries-object";
1702
- readonly flat?: boolean | undefined;
1703
- readonly addGroupKeys?: boolean | undefined;
1704
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1705
- readonly single?: boolean | undefined;
1706
- readonly mapLeaf?: ((value: any) => any) | undefined;
1707
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1708
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1709
- };
1710
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1711
- readonly export: "object";
1712
- readonly flat?: boolean | undefined;
1713
- readonly addGroupKeys?: boolean | undefined;
1714
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1715
- readonly single?: boolean | undefined;
1716
- readonly mapLeaf?: ((value: any) => any) | undefined;
1717
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1718
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1719
- };
1720
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1721
- readonly export: "map";
1722
- readonly flat?: boolean | undefined;
1723
- readonly addGroupKeys?: boolean | undefined;
1724
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1725
- readonly single?: boolean | undefined;
1726
- readonly mapLeaf?: ((value: any) => any) | undefined;
1727
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1728
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1729
- };
1730
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1731
- readonly export: "keys";
1732
- readonly flat?: boolean | undefined;
1733
- readonly addGroupKeys?: boolean | undefined;
1734
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1735
- readonly single?: boolean | undefined;
1736
- readonly mapLeaf?: ((value: any) => any) | undefined;
1737
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1738
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1739
- };
1740
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1741
- readonly export: "values";
1742
- readonly flat?: boolean | undefined;
1743
- readonly addGroupKeys?: boolean | undefined;
1744
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1745
- readonly single?: boolean | undefined;
1746
- readonly mapLeaf?: ((value: any) => any) | undefined;
1747
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1748
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1749
- };
1750
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
1751
- readonly export: "levels";
1752
- readonly flat?: boolean | undefined;
1753
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1754
- readonly addGroupKeys?: boolean | undefined;
1755
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1756
- readonly single?: boolean | undefined;
1757
- readonly mapLeaf?: ((value: any) => any) | undefined;
1758
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1759
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1760
- };
1761
- }
1762
- declare function groupBy<T extends object, Keys extends GK<T>, Opts extends GroupByOptions>(groupKeys: Keys, options: Opts): GroupByFn<T, T, Keys, Opts>;
1763
- declare namespace groupBy {
1764
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1765
- readonly export: "grouped";
1766
- readonly flat?: boolean | undefined;
1767
- readonly addGroupKeys?: boolean | undefined;
1768
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1769
- readonly single?: boolean | undefined;
1770
- readonly mapLeaf?: ((value: any) => any) | undefined;
1771
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1772
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1773
- };
1774
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1775
- readonly export: "entries";
1776
- readonly flat?: boolean | undefined;
1777
- readonly addGroupKeys?: boolean | undefined;
1778
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1779
- readonly single?: boolean | undefined;
1780
- readonly mapLeaf?: ((value: any) => any) | undefined;
1781
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1782
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1783
- };
1784
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1785
- readonly export: "entries-object";
1786
- readonly flat?: boolean | undefined;
1787
- readonly addGroupKeys?: boolean | undefined;
1788
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1789
- readonly single?: boolean | undefined;
1790
- readonly mapLeaf?: ((value: any) => any) | undefined;
1791
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1792
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1793
- };
1794
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1795
- readonly export: "object";
1796
- readonly flat?: boolean | undefined;
1797
- readonly addGroupKeys?: boolean | undefined;
1798
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1799
- readonly single?: boolean | undefined;
1800
- readonly mapLeaf?: ((value: any) => any) | undefined;
1801
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1802
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1803
- };
1804
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1805
- readonly export: "map";
1806
- readonly flat?: boolean | undefined;
1807
- readonly addGroupKeys?: boolean | undefined;
1808
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1809
- readonly single?: boolean | undefined;
1810
- readonly mapLeaf?: ((value: any) => any) | undefined;
1811
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1812
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1813
- };
1814
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1815
- readonly export: "keys";
1816
- readonly flat?: boolean | undefined;
1817
- readonly addGroupKeys?: boolean | undefined;
1818
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1819
- readonly single?: boolean | undefined;
1820
- readonly mapLeaf?: ((value: any) => any) | undefined;
1821
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1822
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1823
- };
1824
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1825
- readonly export: "values";
1826
- readonly flat?: boolean | undefined;
1827
- readonly addGroupKeys?: boolean | undefined;
1828
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1829
- readonly single?: boolean | undefined;
1830
- readonly mapLeaf?: ((value: any) => any) | undefined;
1831
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1832
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1833
- };
1834
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
1835
- readonly export: "levels";
1836
- readonly flat?: boolean | undefined;
1837
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1838
- readonly addGroupKeys?: boolean | undefined;
1839
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1840
- readonly single?: boolean | undefined;
1841
- readonly mapLeaf?: ((value: any) => any) | undefined;
1842
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1843
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1844
- };
1845
- }
1846
- declare function groupBy<T extends object, Keys extends GK<T>>(groupKeys: Keys): GroupByFn<T, T, Keys, GroupByOptions>;
1847
- declare namespace groupBy {
1848
- var grouped: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1849
- readonly export: "grouped";
1850
- readonly flat?: boolean | undefined;
1851
- readonly addGroupKeys?: boolean | undefined;
1852
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1853
- readonly single?: boolean | undefined;
1854
- readonly mapLeaf?: ((value: any) => any) | undefined;
1855
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1856
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1857
- };
1858
- var entries: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1859
- readonly export: "entries";
1860
- readonly flat?: boolean | undefined;
1861
- readonly addGroupKeys?: boolean | undefined;
1862
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1863
- readonly single?: boolean | undefined;
1864
- readonly mapLeaf?: ((value: any) => any) | undefined;
1865
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1866
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1867
- };
1868
- var entriesObject: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1869
- readonly export: "entries-object";
1870
- readonly flat?: boolean | undefined;
1871
- readonly addGroupKeys?: boolean | undefined;
1872
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1873
- readonly single?: boolean | undefined;
1874
- readonly mapLeaf?: ((value: any) => any) | undefined;
1875
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1876
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1877
- };
1878
- var object: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1879
- readonly export: "object";
1880
- readonly flat?: boolean | undefined;
1881
- readonly addGroupKeys?: boolean | undefined;
1882
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1883
- readonly single?: boolean | undefined;
1884
- readonly mapLeaf?: ((value: any) => any) | undefined;
1885
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1886
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1887
- };
1888
- var map: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1889
- readonly export: "map";
1890
- readonly flat?: boolean | undefined;
1891
- readonly addGroupKeys?: boolean | undefined;
1892
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1893
- readonly single?: boolean | undefined;
1894
- readonly mapLeaf?: ((value: any) => any) | undefined;
1895
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1896
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1897
- };
1898
- var keys: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1899
- readonly export: "keys";
1900
- readonly flat?: boolean | undefined;
1901
- readonly addGroupKeys?: boolean | undefined;
1902
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1903
- readonly single?: boolean | undefined;
1904
- readonly mapLeaf?: ((value: any) => any) | undefined;
1905
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1906
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1907
- };
1908
- var values: (options?: Omit<GroupByOptions, "levels" | "export"> | undefined) => {
1909
- readonly export: "values";
1910
- readonly flat?: boolean | undefined;
1911
- readonly addGroupKeys?: boolean | undefined;
1912
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1913
- readonly single?: boolean | undefined;
1914
- readonly mapLeaf?: ((value: any) => any) | undefined;
1915
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1916
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
1917
- };
1918
- var levels: (options?: Omit<GroupByOptions, "export"> | undefined) => {
1919
- readonly export: "levels";
1920
- readonly flat?: boolean | undefined;
1921
- readonly levels?: ("object" | "map" | "entries" | "keys" | "values" | LevelSpec | "entries-object")[] | undefined;
1922
- readonly addGroupKeys?: boolean | undefined;
1923
- readonly compositeKey?: ((keys: any[]) => string) | undefined;
1924
- readonly single?: boolean | undefined;
1925
- readonly mapLeaf?: ((value: any) => any) | undefined;
1926
- readonly mapLeaves?: ((values: any[]) => any) | undefined;
1927
- readonly mapEntry?: ((entry: [any, any], level: number) => any) | undefined;
360
+ readonly levels?: ("entries" | "entries-object" | "object" | "map" | "keys" | "values" | LevelSpec)[];
361
+ readonly addGroupKeys?: boolean;
362
+ readonly flat?: boolean;
363
+ readonly compositeKey?: (keys: any[]) => string;
364
+ readonly single?: boolean;
365
+ readonly mapLeaf?: (value: any) => any;
366
+ readonly mapLeaves?: (values: any[]) => any;
367
+ readonly mapEntry?: (entry: [any, any], level: number) => any;
1928
368
  };
1929
369
  }
1930
370
 
1931
- declare type RenameSpec<T> = Partial<{
371
+ type RenameSpec<T> = Partial<{
1932
372
  [K in keyof T]: string;
1933
373
  }>;
1934
- declare type OutputT<T extends object, Spec extends RenameSpec<T>> = O.Merge<Omit<T, keyof Spec>, {
1935
- [NewKey in Exclude<Spec[keyof Spec], undefined>]: T[O.SelectKeys<Spec, NewKey>];
374
+ type OutputT<T extends object, Spec extends RenameSpec<T>> = Merge<Omit<T, keyof Spec>, {
375
+ [NewKey in Exclude<Spec[keyof Spec], undefined>]: T[KeysMatching<Spec, NewKey> & keyof T];
1936
376
  }>;
1937
377
  /**
1938
378
  * Renames properties/columns in collection
@@ -1948,11 +388,11 @@ declare function slice<T extends object>(start: number, end?: number): TidyFn<T>
1948
388
  /**
1949
389
  * Truncates the array to the first N items
1950
390
  */
1951
- declare const sliceHead: <T extends object>(n: number) => TidyFn<T, T>;
391
+ declare const sliceHead: <T extends object>(n: number) => TidyFn<T>;
1952
392
  /**
1953
393
  * Truncates the array to the last N items
1954
394
  */
1955
- declare const sliceTail: <T extends object>(n: number) => TidyFn<T, T>;
395
+ declare const sliceTail: <T extends object>(n: number) => TidyFn<T>;
1956
396
  /**
1957
397
  * Truncates the array to the first N items ordered by some key
1958
398
  */
@@ -1961,7 +401,7 @@ declare function sliceMin<T extends object>(n: number, orderBy: SingleOrArray<Ke
1961
401
  * Truncates the array to the last N items ordered by some key
1962
402
  */
1963
403
  declare function sliceMax<T extends object>(n: number, orderBy: SingleOrArray<Key | Comparator<T>>): TidyFn<T>;
1964
- declare type SampleOptions = {
404
+ type SampleOptions = {
1965
405
  replace?: boolean;
1966
406
  };
1967
407
  /**
@@ -1969,60 +409,60 @@ declare type SampleOptions = {
1969
409
  */
1970
410
  declare function sliceSample<T extends object>(n: number, options?: SampleOptions | null | undefined): TidyFn<T>;
1971
411
 
1972
- declare type ByMap<JoinT extends Datum, T extends Datum> = Partial<Record<keyof JoinT, keyof T>>;
1973
- declare type JoinOptions<JoinT extends Datum, T extends Datum> = {
412
+ type ByMap<JoinT extends Datum, T extends Datum> = Partial<Record<keyof JoinT, keyof T>>;
413
+ type JoinOptions<JoinT extends Datum, T extends Datum> = {
1974
414
  by?: keyof T | (keyof T)[] | ByMap<JoinT, T>;
1975
415
  };
1976
416
  /**
1977
417
  * Performs an inner join on two collections
1978
418
  * @param itemsToJoin The rows/items to be appended to end of collection
1979
419
  */
1980
- declare function innerJoin<T extends object, JoinT extends object>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T, O.Merge<T, JoinT>>;
420
+ declare function innerJoin<T extends object, JoinT extends object>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T, Merge<T, JoinT>>;
1981
421
 
1982
422
  /**
1983
423
  * Performs a left join on two collections
1984
424
  * @param itemsToJoin The rows/items to be appended to end of collection
1985
425
  */
1986
- declare function leftJoin<T extends Datum, JoinT extends Datum>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T, O.Merge<T, Partial<JoinT>>>;
426
+ declare function leftJoin<T extends Datum, JoinT extends Datum>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T, Merge<T, Partial<JoinT>>>;
1987
427
 
1988
428
  /**
1989
429
  * Performs a full join on two collections
1990
430
  * @param itemsToJoin The rows/items to be appended to end of collection
1991
431
  */
1992
- declare function fullJoin<T extends Datum, JoinT extends Datum>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T, O.Merge<T, Partial<JoinT>>>;
432
+ declare function fullJoin<T extends Datum, JoinT extends Datum>(itemsToJoin: JoinT[], options?: JoinOptions<JoinT, T> | null | undefined): TidyFn<T, Merge<T, Partial<JoinT>>>;
1993
433
 
1994
- declare type MutateSpecValue$1<T, O = any> = ((items: T[]) => O[] | O) | NonFunctionValue;
1995
- declare type MutateSummarySpec<T> = Record<Key, MutateSpecValue$1<T>>;
1996
- declare type ResolvedObj$1<Obj extends Record<Key, MutateSpecValue$1<any>>> = {
434
+ type MutateSpecValue<T, O = any> = ((items: T[]) => O[] | O) | NonFunctionValue;
435
+ type MutateSummarySpec<T> = Record<Key, MutateSpecValue<T>>;
436
+ type ResolvedObj<Obj extends Record<Key, MutateSpecValue<any>>> = {
1997
437
  [K in keyof Obj]: Obj[K] extends (...args: any) => any ? ReturnType<Obj[K]> extends any[] ? ReturnType<Obj[K]>[number] : ReturnType<Obj[K]> extends Float64Array ? number : ReturnType<Obj[K]> : Obj[K];
1998
438
  };
1999
- declare type Mutated$1<T, MSpec extends MutateSummarySpec<T>> = T & ResolvedObj$1<MSpec>;
2000
- declare type Compute$1<T> = A.Compute<T>;
439
+ type Mutated<T, MSpec extends MutateSummarySpec<T>> = T & ResolvedObj<MSpec>;
440
+ type Compute<T> = Prettify<T>;
2001
441
  /**
2002
442
  * Mutates items, looking at multiple items at a time to enable summarization.
2003
443
  * For simpler, item by item mutations, use mutate.
2004
444
  * @param mutateSpec
2005
445
  */
2006
- declare function mutateWithSummary<T extends object, MSpec extends MutateSummarySpec<T>>(mutateSpec: MSpec): TidyFn<T, Compute$1<Mutated$1<T, MSpec>>>;
446
+ declare function mutateWithSummary<T extends object, MSpec extends MutateSummarySpec<T>>(mutateSpec: MSpec): TidyFn<T, Compute<Mutated<T, MSpec>>>;
2007
447
 
2008
448
  /**
2009
449
  * Transmutes items
2010
450
  * @param mutateSpec
2011
451
  */
2012
- declare function transmute<T extends object, MSpec extends MutateSpec<T>>(mutateSpec: MSpec): TidyFn<T, A.Compute<ResolvedObj<MSpec>>>;
452
+ declare function transmute<T extends object, MSpec extends MutateSpec<T>>(mutateSpec: MSpec): TidyFn<T, Prettify<ResolvedObj$1<MSpec>>>;
2013
453
 
2014
- declare type DropKey<T extends Datum> = keyof T extends string | number ? `-${keyof T}` : never;
2015
- declare type KeysInput<T> = (Key | ((items: T[]) => Key[]))[] | readonly DropKey<T>[] | readonly (keyof T)[] | DropKey<T> | keyof T;
2016
- declare type Output<T extends object, KS extends KeysInput<T>> = KS extends readonly DropKey<T>[] ? O.Pick<T, {
2017
- [TK in keyof T]: `-${U.Intersect<TK, string>}` extends KS[number] ? never : TK;
2018
- }[keyof T]> : KS extends readonly Key[] ? O.Pick<T, KS[number]> : KS extends DropKey<T> ? O.Pick<T, {
2019
- [TK in keyof T]: `-${U.Intersect<TK, string>}` extends KS ? never : TK;
2020
- }[keyof T]> : KS extends Key ? O.Pick<T, U.Intersect<KS, keyof T>> : T;
454
+ type DropKey<T extends object> = keyof T extends string | number ? `-${keyof T}` : never;
455
+ type KeysInput<T extends object> = (Key | ((items: T[]) => Key[]))[] | readonly DropKey<T>[] | readonly (keyof T)[] | DropKey<T> | keyof T;
456
+ type Output$1<T extends object, KS extends KeysInput<T>> = KS extends readonly DropKey<T>[] ? Pick<T, {
457
+ [TK in keyof T]: `-${Extract<TK, string>}` extends KS[number] ? never : TK;
458
+ }[keyof T]> : KS extends readonly Key[] ? Pick<T, Extract<KS[number], keyof T>> : KS extends DropKey<T> ? Pick<T, {
459
+ [TK in keyof T]: `-${Extract<TK, string>}` extends KS ? never : TK;
460
+ }[keyof T]> : KS extends Key ? Pick<T, Extract<KS, keyof T>> : T;
2021
461
  /**
2022
462
  * selects subparts of the objects (aka pick)
2023
463
  * @param selectFn Returns true to keep the item, false to select out
2024
464
  */
2025
- declare function select<T extends object, Keys extends KeysInput<T>>(selectKeys: Keys): TidyFn<T, Output<T, Keys>>;
465
+ declare function select<T extends object, Keys extends KeysInput<T>>(selectKeys: Keys): TidyFn<T, Output$1<T, Keys>>;
2026
466
 
2027
467
  /**
2028
468
  * adds items to the end of the collection
@@ -2030,34 +470,34 @@ declare function select<T extends object, Keys extends KeysInput<T>>(selectKeys:
2030
470
  */
2031
471
  declare function addRows<T extends object>(itemsToAdd: SingleOrArray<T> | ((items: T[]) => SingleOrArray<T>)): TidyFn<T>;
2032
472
 
2033
- declare type PivotOutput = Record<Key, any>;
2034
- declare type PivotWiderOptions<T extends object> = {
473
+ type PivotOutput$1 = Record<Key, any>;
474
+ type PivotWiderOptions<T extends object> = {
2035
475
  namesFrom: SingleOrArray<keyof T>;
2036
476
  namesSep?: string;
2037
477
  valuesFrom: SingleOrArray<keyof T>;
2038
478
  valuesFill?: any;
2039
479
  valuesFillMap?: Partial<Record<Key, any>>;
2040
480
  };
2041
- declare function pivotWider<T extends object>(options: PivotWiderOptions<T>): TidyFn<T, PivotOutput>;
481
+ declare function pivotWider<T extends object>(options: PivotWiderOptions<T>): TidyFn<T, PivotOutput$1>;
2042
482
 
2043
- declare type PivotLongerOptions = {
483
+ type PivotLongerOptions = {
2044
484
  cols?: any;
2045
485
  namesTo: SingleOrArray<Key>;
2046
486
  namesSep?: string;
2047
487
  valuesTo: SingleOrArray<Key>;
2048
488
  };
2049
- declare type PivotOutput$1 = Record<Key, any>;
2050
- declare function pivotLonger<T extends object>(options: PivotLongerOptions): TidyFn<T, PivotOutput$1>;
489
+ type PivotOutput = Record<Key, any>;
490
+ declare function pivotLonger<T extends object>(options: PivotLongerOptions): TidyFn<T, PivotOutput>;
2051
491
 
2052
- declare type KeyMap<T extends object = any> = Partial<{
492
+ type KeyMap<T extends object = any> = Partial<{
2053
493
  [key in keyof T]: keyof T | Array<T[key]> | ((items: T[]) => T[key][]);
2054
494
  }>;
2055
495
  /**
2056
496
  * Expands a set of items to include all combinations of the specified keys.
2057
497
  */
2058
- declare function expand<T extends object = any, K extends keyof T = keyof T>(expandKeys: K): TidyFn<T, A.Compute<Pick<T, K>>>;
2059
- declare function expand<T extends object = any, K extends (keyof T)[] = (keyof T)[]>(expandKeys: K): TidyFn<T, A.Compute<Pick<T, K[number]>>>;
2060
- declare function expand<T extends object = any, K extends KeyMap<T> = KeyMap<T>>(expandKeys: K): TidyFn<T, O.Pick<T, keyof K>>;
498
+ declare function expand<T extends object = any, K extends keyof T = keyof T>(expandKeys: K): TidyFn<T, Prettify<Pick<T, K>>>;
499
+ declare function expand<T extends object = any, K extends (keyof T)[] = (keyof T)[]>(expandKeys: K): TidyFn<T, Prettify<Pick<T, K[number]>>>;
500
+ declare function expand<T extends object = any, K extends KeyMap<T> = KeyMap<T>>(expandKeys: K): TidyFn<T, Pick<T, Extract<keyof K, keyof T>>>;
2061
501
 
2062
502
  /**
2063
503
  * Create a full sequence given a vector of values
@@ -2076,16 +516,16 @@ declare function fullSeq<T extends object>(key: keyof T | ((d: T) => number), pe
2076
516
  declare function fullSeqDate<T extends object>(key: keyof T | ((d: T) => Date), granularity?: Granularity | null | undefined, period?: number | null | undefined): (items: T[]) => Date[];
2077
517
  declare function fullSeqDateISOString<T extends object>(key: keyof T | ((d: T) => string), granularity?: Granularity | null | undefined, period?: number | null | undefined): (items: T[]) => string[];
2078
518
 
2079
- declare type Spec<T extends object> = {
519
+ type Spec<T extends object> = {
2080
520
  [K in keyof T]: T[K];
2081
521
  };
2082
- declare type Output$1<T extends object, ReplaceSpec extends Partial<Spec<T>>> = O.Merge<Omit<T, keyof ReplaceSpec>, {
522
+ type Output<T extends object, ReplaceSpec extends Partial<Spec<T>>> = Merge<Omit<T, keyof ReplaceSpec>, {
2083
523
  [K in keyof ReplaceSpec]: K extends keyof T ? Exclude<T[K], null | undefined> | ReplaceSpec[K] : ReplaceSpec[K];
2084
524
  }>;
2085
525
  /**
2086
526
  * Replaces nully values with what is specified in the spec
2087
527
  */
2088
- declare function replaceNully<T extends object, ReplaceSpec extends Spec<Partial<T>> = Spec<Partial<T>>>(replaceSpec: ReplaceSpec): TidyFn<T, Output$1<T, ReplaceSpec>>;
528
+ declare function replaceNully<T extends object, ReplaceSpec extends Spec<Partial<T>> = Spec<Partial<T>>>(replaceSpec: ReplaceSpec): TidyFn<T, Output<T, ReplaceSpec>>;
2089
529
 
2090
530
  /**
2091
531
  * Complete a collection with missing combinations of data
@@ -2099,7 +539,7 @@ declare function complete<T extends object>(expandKeys: SingleOrArray<Key> | Key
2099
539
  */
2100
540
  declare function fill<T extends object>(keys: SingleOrArray<Key>): TidyFn<T>;
2101
541
 
2102
- declare type Options = {
542
+ type Options = {
2103
543
  limit?: number | null;
2104
544
  output?: 'log' | 'table';
2105
545
  };
@@ -2108,7 +548,7 @@ declare type Options = {
2108
548
  */
2109
549
  declare function debug<T extends object>(label?: string | null | undefined, options?: Options | null | undefined): TidyFn<T>;
2110
550
 
2111
- declare type RateOptions<T> = {
551
+ type RateOptions<T> = {
2112
552
  predicate?: (d: T, index: number, array: Iterable<T>) => boolean;
2113
553
  allowDivideByZero?: boolean;
2114
554
  };
@@ -2116,11 +556,11 @@ declare type RateOptions<T> = {
2116
556
  * Returns a function that computes a rate (numerator / denominator), setting the value to
2117
557
  * 0 if denominator = 0 and numerator = 0.
2118
558
  */
2119
- declare function rate<T extends object>(numerator: keyof T | ((d: T, index: number, array: Iterable<T>) => number), denominator: keyof T | ((d: T, index: number, array: Iterable<T>) => number), options?: RateOptions<T>): (d: T, index: number, array: Iterable<T>) => number | undefined;
559
+ declare function rate$1<T extends object>(numerator: keyof T | ((d: T, index: number, array: Iterable<T>) => number), denominator: keyof T | ((d: T, index: number, array: Iterable<T>) => number), options?: RateOptions<T>): (d: T, index: number, array: Iterable<T>) => number | undefined;
2120
560
 
2121
- declare function cumsum<T extends object>(key: keyof T | ((d: T, index: number, array: Iterable<T>) => number | null | undefined)): (items: T[]) => Float64Array;
561
+ declare function cumsum<T extends object>(key: keyof T | ((d: T, index: number, array: Iterable<T>) => number | null | undefined)): (items: T[]) => Float64Array<ArrayBufferLike>;
2122
562
 
2123
- declare type RollOptions = {
563
+ type RollOptions = {
2124
564
  partial?: boolean;
2125
565
  /** which direction the window is aligned to (default: right, looking back)
2126
566
  * - right: current row is the last item [1,2,**3**]
@@ -2138,7 +578,7 @@ declare type RollOptions = {
2138
578
  */
2139
579
  declare function roll<T extends object>(width: number, rollFn: (itemsInWindow: T[], endIndex: number) => any, options?: RollOptions | undefined | null): (items: any[]) => any[];
2140
580
 
2141
- declare type LagOptions = {
581
+ type LagOptions = {
2142
582
  /** Number of positions to lag by (default: 1) */
2143
583
  n?: number;
2144
584
  /** The default value for non-existent rows. */
@@ -2152,7 +592,7 @@ declare type LagOptions = {
2152
592
  */
2153
593
  declare function lag<T extends object>(key: keyof T | ((d: T, index: number, array: Iterable<T>) => any), options?: LagOptions | undefined | null): (items: T[]) => any[];
2154
594
 
2155
- declare type LeadOptions = {
595
+ type LeadOptions = {
2156
596
  /** Number of positions to lead by (default: 1) */
2157
597
  n?: number;
2158
598
  /** The default value for non-existent rows. */
@@ -2166,7 +606,7 @@ declare type LeadOptions = {
2166
606
  */
2167
607
  declare function lead<T extends object>(key: keyof T | ((d: T, index: number, array: Iterable<T>) => any), options?: LeadOptions | undefined | null): (items: T[]) => any[];
2168
608
 
2169
- declare type RowNumberOptions = {
609
+ type RowNumberOptions = {
2170
610
  /** what to start row numbers at, default is 0 */
2171
611
  startAt?: number;
2172
612
  };
@@ -2175,7 +615,7 @@ declare type RowNumberOptions = {
2175
615
  */
2176
616
  declare function rowNumber<T>(options?: RowNumberOptions): (items: T[]) => number[];
2177
617
 
2178
- declare type SumOptions<T> = {
618
+ type SumOptions<T> = {
2179
619
  predicate?: (d: T, index: number, array: Iterable<T>) => boolean;
2180
620
  };
2181
621
  /**
@@ -2227,7 +667,7 @@ declare function deviation<T extends object>(key: keyof T | ((d: T, index: numbe
2227
667
  */
2228
668
  declare function variance<T extends object>(key: keyof T | ((d: T, index: number, array: Iterable<T>) => number)): (items: T[]) => number | undefined;
2229
669
 
2230
- declare type NOptions<T> = {
670
+ type NOptions<T> = {
2231
671
  predicate?: (d: T, index: number, array: Iterable<T>) => boolean;
2232
672
  };
2233
673
  /**
@@ -2295,18 +735,20 @@ declare function negate<T extends object>(selectors: SingleOrArray<keyof T | ((i
2295
735
 
2296
736
  /** Tidy math helpers */
2297
737
  /** Compute a fraction while handling common edge cases */
2298
- declare function rate$1(numerator: number | null | undefined, denominator: number | null | undefined, allowDivideByZero?: boolean): number | undefined;
738
+ declare function rate(numerator: number | null | undefined, denominator: number | null | undefined, allowDivideByZero?: boolean): number | undefined;
2299
739
  declare function subtract(a: number | null | undefined, b: number | null | undefined, nullyZero?: boolean): number | undefined;
2300
740
  declare function add(a: number | null | undefined, b: number | null | undefined, nullyZero?: boolean): number | undefined;
2301
741
 
2302
- declare const math_subtract: typeof subtract;
2303
742
  declare const math_add: typeof add;
743
+ declare const math_rate: typeof rate;
744
+ declare const math_subtract: typeof subtract;
2304
745
  declare namespace math {
2305
746
  export {
2306
- rate$1 as rate,
2307
- math_subtract as subtract,
2308
747
  math_add as add,
748
+ math_rate as rate,
749
+ math_subtract as subtract,
2309
750
  };
2310
751
  }
2311
752
 
2312
- export { Comparator, Datum, Granularity, GroupKey, Grouped, Key, KeyOrFn, LevelSpec, NonFunctionValue, Primitive, SummarizeOptions, SummarizeSpec, math as TMath, TidyContext, TidyFn, TidyGroupExportFn, Vector, addRows as addItems, addRows, arrange, asc, complete, contains, count, cumsum, debug, desc, deviation, distinct, endsWith, everything, expand, fill, filter, first, fixedOrder, fullJoin, fullSeq, fullSeqDate, fullSeqDateISOString, groupBy, innerJoin, lag, last, lead, leftJoin, map, matches, max, mean, meanRate, median, min, mutate, mutateWithSummary, n, nDistinct, negate, numRange, select as pick, pivotLonger, pivotWider, rate, rename, replaceNully, roll, rowNumber, select, slice, sliceHead, sliceMax, sliceMin, sliceSample, sliceTail, arrange as sort, startsWith, sum, summarize, summarizeAll, summarizeAt, summarizeIf, tally, tidy, total, totalAll, totalAt, totalIf, transmute, variance, vectorSeq, vectorSeqDate, when };
753
+ export { math as TMath, addRows as addItems, addRows, arrange, asc, complete, contains, count, cumsum, debug, desc, deviation, distinct, endsWith, everything, expand, fill, filter, first, fixedOrder, fullJoin, fullSeq, fullSeqDate, fullSeqDateISOString, groupBy, innerJoin, lag, last, lead, leftJoin, map, matches, max, mean, meanRate, median, min, mutate, mutateWithSummary, n, nDistinct, negate, numRange, select as pick, pivotLonger, pivotWider, rate$1 as rate, rename, replaceNully, roll, rowNumber, select, slice, sliceHead, sliceMax, sliceMin, sliceSample, sliceTail, arrange as sort, startsWith, sum, summarize, summarizeAll, summarizeAt, summarizeIf, tally, tidy, total, totalAll, totalAt, totalIf, transmute, variance, vectorSeq, vectorSeqDate, when };
754
+ export type { Comparator, Datum, Granularity, GroupKey, Grouped, Key, KeyOrFn, LevelSpec, NonFunctionValue, Primitive, SummarizeOptions, SummarizeSpec, TidyContext, TidyFn, TidyGroupExportFn, Vector };