@tanstack/table-core 9.0.0-alpha.47 → 9.0.0-alpha.49

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 (246) hide show
  1. package/README.md +10 -0
  2. package/dist/core/cells/coreCellsFeature.utils.cjs +11 -8
  3. package/dist/core/cells/coreCellsFeature.utils.cjs.map +1 -1
  4. package/dist/core/cells/coreCellsFeature.utils.d.cts +11 -8
  5. package/dist/core/cells/coreCellsFeature.utils.d.ts +11 -8
  6. package/dist/core/cells/coreCellsFeature.utils.js +11 -8
  7. package/dist/core/cells/coreCellsFeature.utils.js.map +1 -1
  8. package/dist/core/columns/coreColumnsFeature.types.d.cts +7 -6
  9. package/dist/core/columns/coreColumnsFeature.types.d.ts +7 -6
  10. package/dist/core/columns/coreColumnsFeature.utils.cjs +37 -27
  11. package/dist/core/columns/coreColumnsFeature.utils.cjs.map +1 -1
  12. package/dist/core/columns/coreColumnsFeature.utils.d.cts +37 -27
  13. package/dist/core/columns/coreColumnsFeature.utils.d.ts +37 -27
  14. package/dist/core/columns/coreColumnsFeature.utils.js +37 -27
  15. package/dist/core/columns/coreColumnsFeature.utils.js.map +1 -1
  16. package/dist/core/headers/coreHeadersFeature.types.d.cts +6 -4
  17. package/dist/core/headers/coreHeadersFeature.types.d.ts +6 -4
  18. package/dist/core/headers/coreHeadersFeature.utils.cjs +23 -18
  19. package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
  20. package/dist/core/headers/coreHeadersFeature.utils.d.cts +23 -18
  21. package/dist/core/headers/coreHeadersFeature.utils.d.ts +23 -18
  22. package/dist/core/headers/coreHeadersFeature.utils.js +23 -18
  23. package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
  24. package/dist/core/row-models/coreRowModelsFeature.utils.cjs +48 -36
  25. package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +1 -1
  26. package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +48 -36
  27. package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +48 -36
  28. package/dist/core/row-models/coreRowModelsFeature.utils.js +48 -36
  29. package/dist/core/row-models/coreRowModelsFeature.utils.js.map +1 -1
  30. package/dist/core/rows/coreRowsFeature.types.d.cts +4 -4
  31. package/dist/core/rows/coreRowsFeature.types.d.ts +4 -4
  32. package/dist/core/rows/coreRowsFeature.utils.cjs +34 -28
  33. package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
  34. package/dist/core/rows/coreRowsFeature.utils.d.cts +34 -28
  35. package/dist/core/rows/coreRowsFeature.utils.d.ts +34 -28
  36. package/dist/core/rows/coreRowsFeature.utils.js +34 -28
  37. package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
  38. package/dist/core/table/coreTablesFeature.types.d.cts +6 -2
  39. package/dist/core/table/coreTablesFeature.types.d.ts +6 -2
  40. package/dist/core/table/coreTablesFeature.utils.cjs +2 -2
  41. package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
  42. package/dist/core/table/coreTablesFeature.utils.d.cts +2 -2
  43. package/dist/core/table/coreTablesFeature.utils.d.ts +2 -2
  44. package/dist/core/table/coreTablesFeature.utils.js +2 -2
  45. package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
  46. package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +16 -10
  47. package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +16 -10
  48. package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +26 -18
  49. package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +1 -1
  50. package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +26 -18
  51. package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +26 -18
  52. package/dist/features/column-faceting/columnFacetingFeature.utils.js +26 -18
  53. package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +1 -1
  54. package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +21 -11
  55. package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +21 -11
  56. package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +39 -28
  57. package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
  58. package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +39 -28
  59. package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +39 -28
  60. package/dist/features/column-filtering/columnFilteringFeature.utils.js +39 -28
  61. package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
  62. package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +18 -14
  63. package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +18 -14
  64. package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +55 -43
  65. package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +1 -1
  66. package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +55 -43
  67. package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +55 -43
  68. package/dist/features/column-grouping/columnGroupingFeature.utils.js +55 -43
  69. package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +1 -1
  70. package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +14 -5
  71. package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +14 -5
  72. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +30 -23
  73. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
  74. package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +30 -23
  75. package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +30 -23
  76. package/dist/features/column-ordering/columnOrderingFeature.utils.js +30 -23
  77. package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
  78. package/dist/features/column-pinning/columnPinningFeature.types.d.cts +43 -31
  79. package/dist/features/column-pinning/columnPinningFeature.types.d.ts +43 -31
  80. package/dist/features/column-pinning/columnPinningFeature.utils.cjs +111 -91
  81. package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
  82. package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +111 -91
  83. package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +111 -91
  84. package/dist/features/column-pinning/columnPinningFeature.utils.js +111 -91
  85. package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
  86. package/dist/features/column-resizing/columnResizingFeature.types.d.cts +9 -9
  87. package/dist/features/column-resizing/columnResizingFeature.types.d.ts +9 -9
  88. package/dist/features/column-resizing/columnResizingFeature.utils.cjs +29 -20
  89. package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +1 -1
  90. package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +28 -19
  91. package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +28 -19
  92. package/dist/features/column-resizing/columnResizingFeature.utils.js +29 -20
  93. package/dist/features/column-resizing/columnResizingFeature.utils.js.map +1 -1
  94. package/dist/features/column-sizing/columnSizingFeature.types.d.cts +19 -12
  95. package/dist/features/column-sizing/columnSizingFeature.types.d.ts +19 -12
  96. package/dist/features/column-sizing/columnSizingFeature.utils.cjs +52 -41
  97. package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
  98. package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +52 -41
  99. package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +52 -41
  100. package/dist/features/column-sizing/columnSizingFeature.utils.js +52 -41
  101. package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
  102. package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +16 -13
  103. package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +16 -13
  104. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +54 -42
  105. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
  106. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +54 -42
  107. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +54 -42
  108. package/dist/features/column-visibility/columnVisibilityFeature.utils.js +54 -42
  109. package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
  110. package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +10 -5
  111. package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +10 -5
  112. package/dist/features/global-filtering/globalFilteringFeature.utils.cjs +20 -14
  113. package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
  114. package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +20 -14
  115. package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +20 -14
  116. package/dist/features/global-filtering/globalFilteringFeature.utils.js +20 -14
  117. package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
  118. package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +16 -15
  119. package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +16 -15
  120. package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +56 -41
  121. package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +1 -1
  122. package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +56 -41
  123. package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +56 -41
  124. package/dist/features/row-expanding/rowExpandingFeature.utils.js +56 -41
  125. package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +1 -1
  126. package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +19 -12
  127. package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +19 -12
  128. package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +49 -32
  129. package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +1 -1
  130. package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +49 -32
  131. package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +49 -32
  132. package/dist/features/row-pagination/rowPaginationFeature.utils.js +49 -32
  133. package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +1 -1
  134. package/dist/features/row-pinning/rowPinningFeature.types.d.cts +12 -8
  135. package/dist/features/row-pinning/rowPinningFeature.types.d.ts +12 -8
  136. package/dist/features/row-pinning/rowPinningFeature.utils.cjs +39 -29
  137. package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +1 -1
  138. package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +39 -29
  139. package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +39 -29
  140. package/dist/features/row-pinning/rowPinningFeature.utils.js +39 -29
  141. package/dist/features/row-pinning/rowPinningFeature.utils.js.map +1 -1
  142. package/dist/features/row-selection/rowSelectionFeature.types.d.cts +30 -24
  143. package/dist/features/row-selection/rowSelectionFeature.types.d.ts +30 -24
  144. package/dist/features/row-selection/rowSelectionFeature.utils.cjs +89 -69
  145. package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
  146. package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +89 -69
  147. package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +89 -69
  148. package/dist/features/row-selection/rowSelectionFeature.utils.js +89 -69
  149. package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
  150. package/dist/features/row-sorting/rowSortingFeature.types.d.cts +10 -8
  151. package/dist/features/row-sorting/rowSortingFeature.types.d.ts +10 -8
  152. package/dist/features/row-sorting/rowSortingFeature.utils.cjs +62 -45
  153. package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +1 -1
  154. package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +61 -44
  155. package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +61 -44
  156. package/dist/features/row-sorting/rowSortingFeature.utils.js +62 -45
  157. package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
  158. package/dist/fns/aggregationFns.cjs +33 -9
  159. package/dist/fns/aggregationFns.cjs.map +1 -1
  160. package/dist/fns/aggregationFns.d.cts +33 -9
  161. package/dist/fns/aggregationFns.d.ts +33 -9
  162. package/dist/fns/aggregationFns.js +33 -9
  163. package/dist/fns/aggregationFns.js.map +1 -1
  164. package/dist/fns/filterFns.cjs +48 -17
  165. package/dist/fns/filterFns.cjs.map +1 -1
  166. package/dist/fns/filterFns.d.cts +42 -15
  167. package/dist/fns/filterFns.d.ts +42 -15
  168. package/dist/fns/filterFns.js +48 -17
  169. package/dist/fns/filterFns.js.map +1 -1
  170. package/dist/helpers/columnHelper.cjs +9 -4
  171. package/dist/helpers/columnHelper.cjs.map +1 -1
  172. package/dist/helpers/columnHelper.d.cts +9 -4
  173. package/dist/helpers/columnHelper.d.ts +9 -4
  174. package/dist/helpers/columnHelper.js +9 -4
  175. package/dist/helpers/columnHelper.js.map +1 -1
  176. package/dist/helpers/tableOptions.cjs.map +1 -1
  177. package/dist/helpers/tableOptions.d.cts +12 -9
  178. package/dist/helpers/tableOptions.d.ts +12 -9
  179. package/dist/helpers/tableOptions.js.map +1 -1
  180. package/dist/types/ColumnDef.d.cts +38 -0
  181. package/dist/types/ColumnDef.d.ts +38 -0
  182. package/dist/types/TableOptions.d.cts +15 -0
  183. package/dist/types/TableOptions.d.ts +15 -0
  184. package/dist/types/TableState.d.cts +12 -0
  185. package/dist/types/TableState.d.ts +12 -0
  186. package/package.json +5 -3
  187. package/skills/column-definitions/SKILL.md +333 -0
  188. package/skills/column-layout/SKILL.md +328 -0
  189. package/skills/column-layout/references/subsystems.md +220 -0
  190. package/skills/customizing-feature-behavior/SKILL.md +416 -0
  191. package/skills/filtering/SKILL.md +357 -0
  192. package/skills/filtering/references/faceting-and-fuzzy.md +191 -0
  193. package/skills/grouping/SKILL.md +448 -0
  194. package/skills/migrate-v8-to-v9/SKILL.md +495 -0
  195. package/skills/pagination/SKILL.md +385 -0
  196. package/skills/row-expanding/SKILL.md +348 -0
  197. package/skills/row-pinning/SKILL.md +269 -0
  198. package/skills/row-selection/SKILL.md +391 -0
  199. package/skills/setup/SKILL.md +400 -0
  200. package/skills/sorting/SKILL.md +344 -0
  201. package/skills/state-management/SKILL.md +388 -0
  202. package/src/core/cells/coreCellsFeature.utils.ts +11 -8
  203. package/src/core/columns/coreColumnsFeature.types.ts +7 -6
  204. package/src/core/columns/coreColumnsFeature.utils.ts +37 -27
  205. package/src/core/headers/coreHeadersFeature.types.ts +6 -4
  206. package/src/core/headers/coreHeadersFeature.utils.ts +23 -18
  207. package/src/core/row-models/coreRowModelsFeature.utils.ts +48 -36
  208. package/src/core/rows/coreRowsFeature.types.ts +4 -4
  209. package/src/core/rows/coreRowsFeature.utils.ts +34 -28
  210. package/src/core/table/coreTablesFeature.types.ts +6 -2
  211. package/src/core/table/coreTablesFeature.utils.ts +2 -2
  212. package/src/features/column-faceting/columnFacetingFeature.types.ts +16 -10
  213. package/src/features/column-faceting/columnFacetingFeature.utils.ts +26 -18
  214. package/src/features/column-filtering/columnFilteringFeature.types.ts +21 -11
  215. package/src/features/column-filtering/columnFilteringFeature.utils.ts +39 -28
  216. package/src/features/column-grouping/columnGroupingFeature.types.ts +18 -14
  217. package/src/features/column-grouping/columnGroupingFeature.utils.ts +55 -43
  218. package/src/features/column-ordering/columnOrderingFeature.types.ts +14 -5
  219. package/src/features/column-ordering/columnOrderingFeature.utils.ts +30 -23
  220. package/src/features/column-pinning/columnPinningFeature.types.ts +43 -31
  221. package/src/features/column-pinning/columnPinningFeature.utils.ts +111 -91
  222. package/src/features/column-resizing/columnResizingFeature.types.ts +9 -9
  223. package/src/features/column-resizing/columnResizingFeature.utils.ts +29 -21
  224. package/src/features/column-sizing/columnSizingFeature.types.ts +19 -12
  225. package/src/features/column-sizing/columnSizingFeature.utils.ts +52 -41
  226. package/src/features/column-visibility/columnVisibilityFeature.types.ts +16 -13
  227. package/src/features/column-visibility/columnVisibilityFeature.utils.ts +54 -42
  228. package/src/features/global-filtering/globalFilteringFeature.types.ts +10 -5
  229. package/src/features/global-filtering/globalFilteringFeature.utils.ts +20 -14
  230. package/src/features/row-expanding/rowExpandingFeature.types.ts +16 -15
  231. package/src/features/row-expanding/rowExpandingFeature.utils.ts +56 -41
  232. package/src/features/row-pagination/rowPaginationFeature.types.ts +19 -12
  233. package/src/features/row-pagination/rowPaginationFeature.utils.ts +49 -32
  234. package/src/features/row-pinning/rowPinningFeature.types.ts +12 -8
  235. package/src/features/row-pinning/rowPinningFeature.utils.ts +39 -29
  236. package/src/features/row-selection/rowSelectionFeature.types.ts +30 -24
  237. package/src/features/row-selection/rowSelectionFeature.utils.ts +89 -69
  238. package/src/features/row-sorting/rowSortingFeature.types.ts +10 -8
  239. package/src/features/row-sorting/rowSortingFeature.utils.ts +62 -45
  240. package/src/fns/aggregationFns.ts +33 -9
  241. package/src/fns/filterFns.ts +48 -17
  242. package/src/helpers/columnHelper.ts +9 -4
  243. package/src/helpers/tableOptions.ts +12 -9
  244. package/src/types/ColumnDef.ts +38 -0
  245. package/src/types/TableOptions.ts +15 -0
  246. package/src/types/TableState.ts +12 -0
@@ -13,13 +13,14 @@ import type {
13
13
  // State Utils
14
14
 
15
15
  /**
16
- * Returns the default sorting state.
16
+ * Creates the default sorting state.
17
17
  *
18
- * Feature constructors use this value to initialize the table state or option defaults when no user value is provided.
18
+ * The feature default is an empty array, meaning no columns are sorted. Reset
19
+ * APIs use this value when `defaultState` is `true`.
19
20
  *
20
21
  * @example
21
22
  * ```ts
22
- * const initialValue = getDefaultSortingState()
23
+ * const sorting = getDefaultSortingState()
23
24
  * ```
24
25
  */
25
26
  export function getDefaultSortingState(): SortingState {
@@ -27,13 +28,14 @@ export function getDefaultSortingState(): SortingState {
27
28
  }
28
29
 
29
30
  /**
30
- * Updates the table's sorting state slice.
31
+ * Routes a sorting updater through the table's sorting change handler.
31
32
  *
32
- * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom.
33
+ * The updater may be a next `SortingState` array or a function of the previous
34
+ * sorting state, matching the instance `table.setSorting` behavior.
33
35
  *
34
36
  * @example
35
37
  * ```ts
36
- * table_setSorting(table, (old) => old)
38
+ * table_setSorting(table, (old) => [...old, { id: 'age', desc: true }])
37
39
  * ```
38
40
  */
39
41
  export function table_setSorting<
@@ -44,9 +46,10 @@ export function table_setSorting<
44
46
  }
45
47
 
46
48
  /**
47
- * Resets the table's sorting state slice.
49
+ * Resets `sorting` to the configured initial state or feature default.
48
50
  *
49
- * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value.
51
+ * With no argument, the reset clones `table.initialState.sorting` when it
52
+ * exists. Passing `true` ignores initial state and resets to `[]`.
50
53
  *
51
54
  * @example
52
55
  * ```ts
@@ -67,13 +70,15 @@ export function table_resetSorting<
67
70
  // Column Utils
68
71
 
69
72
  /**
70
- * Infers sort fn for a column.
73
+ * Chooses a built-in sorting function from sampled filtered row values.
71
74
  *
72
- * The inference uses the column definition, table options, and sampled row values when needed.
75
+ * Date-like values use `datetime`, mixed text/numeric strings use
76
+ * `alphanumeric`, plain strings use `text`, and unknown values fall back to
77
+ * `basic`.
73
78
  *
74
79
  * @example
75
80
  * ```ts
76
- * const value = column_getAutoSortFn(column)
81
+ * const sortFn = column_getAutoSortFn(column)
77
82
  * ```
78
83
  */
79
84
  export function column_getAutoSortFn<
@@ -86,7 +91,7 @@ export function column_getAutoSortFn<
86
91
 
87
92
  let sortFn: SortFn<TFeatures, TData> | undefined
88
93
 
89
- const firstRows = column.table.getFilteredRowModel().flatRows.slice(10)
94
+ const firstRows = column.table.getFilteredRowModel().flatRows.slice(0, 10)
90
95
 
91
96
  let isString = false
92
97
 
@@ -114,13 +119,14 @@ export function column_getAutoSortFn<
114
119
  }
115
120
 
116
121
  /**
117
- * Infers sort dir for a column.
122
+ * Chooses the default first sort direction from the first filtered row value.
118
123
  *
119
- * The inference uses the column definition, table options, and sampled row values when needed.
124
+ * String columns start ascending so alphabetical order is natural; other value
125
+ * types start descending.
120
126
  *
121
127
  * @example
122
128
  * ```ts
123
- * const value = column_getAutoSortDir(column)
129
+ * const direction = column_getAutoSortDir(column)
124
130
  * ```
125
131
  */
126
132
  export function column_getAutoSortDir<
@@ -140,13 +146,15 @@ export function column_getAutoSortDir<
140
146
  }
141
147
 
142
148
  /**
143
- * Returns sort fn for a column.
149
+ * Resolves the sorting function configured for a column.
144
150
  *
145
- * This derives the value from the column definition, table options, and the feature state atoms registered on the table.
151
+ * Function-valued `columnDef.sortFn` is returned directly, `'auto'` delegates
152
+ * to `column_getAutoSortFn`, and string values are looked up in the table's
153
+ * sorting function registry before falling back to `basic`.
146
154
  *
147
155
  * @example
148
156
  * ```ts
149
- * const value = column_getSortFn(column)
157
+ * const sortFn = column_getSortFn(column)
150
158
  * ```
151
159
  */
152
160
  export function column_getSortFn<
@@ -165,13 +173,15 @@ export function column_getSortFn<
165
173
  }
166
174
 
167
175
  /**
168
- * Toggles sorting for a column.
176
+ * Applies the next sorting state for this column.
169
177
  *
170
- * The update is applied through the owning table state slice and respects the feature options for that column.
178
+ * The toggle can add, replace, flip, or remove this column's sort entry. Multi
179
+ * sorting respects `enableMultiSort`, `maxMultiSortColCount`, and the `multi`
180
+ * argument.
171
181
  *
172
182
  * @example
173
183
  * ```ts
174
- * column_toggleSorting(column)
184
+ * column_toggleSorting(column, undefined, true)
175
185
  * ```
176
186
  */
177
187
  export function column_toggleSorting<
@@ -278,13 +288,14 @@ export function column_toggleSorting<
278
288
  }
279
289
 
280
290
  /**
281
- * Returns first sort dir for a column.
291
+ * Resolves the first direction used when this column begins sorting.
282
292
  *
283
- * This derives the value from the column definition, table options, and the feature state atoms registered on the table.
293
+ * Column-level `sortDescFirst` wins, then table-level `sortDescFirst`, then the
294
+ * auto direction inferred from sampled values.
284
295
  *
285
296
  * @example
286
297
  * ```ts
287
- * const value = column_getFirstSortDir(column)
298
+ * const firstDirection = column_getFirstSortDir(column)
288
299
  * ```
289
300
  */
290
301
  export function column_getFirstSortDir<
@@ -300,13 +311,14 @@ export function column_getFirstSortDir<
300
311
  }
301
312
 
302
313
  /**
303
- * Returns next sorting order for a column.
314
+ * Resolves the next sort order for this column's toggle cycle.
304
315
  *
305
- * This derives the value from the column definition, table options, and the feature state atoms registered on the table.
316
+ * The cycle starts with the first sort direction, flips between `asc` and
317
+ * `desc`, and can return `false` when sorting removal is enabled.
306
318
  *
307
319
  * @example
308
320
  * ```ts
309
- * const value = column_getNextSortingOrder(column)
321
+ * const nextOrder = column_getNextSortingOrder(column)
310
322
  * ```
311
323
  */
312
324
  export function column_getNextSortingOrder<
@@ -332,13 +344,14 @@ export function column_getNextSortingOrder<
332
344
  }
333
345
 
334
346
  /**
335
- * Returns whether a column can use sort.
347
+ * Checks whether this accessor column can participate in sorting.
336
348
  *
337
- * This combines column options, table options, and any required accessor or feature state for the capability.
349
+ * The column must have an accessor and sorting must be enabled by both the
350
+ * column definition and table options.
338
351
  *
339
352
  * @example
340
353
  * ```ts
341
- * const value = column_getCanSort(column)
354
+ * const canSort = column_getCanSort(column)
342
355
  * ```
343
356
  */
344
357
  export function column_getCanSort<
@@ -354,13 +367,14 @@ export function column_getCanSort<
354
367
  }
355
368
 
356
369
  /**
357
- * Returns whether a column can use multi sort.
370
+ * Checks whether this column can be added to a multi-sort state.
358
371
  *
359
- * This combines column options, table options, and any required accessor or feature state for the capability.
372
+ * Column-level `enableMultiSort` wins over table-level `enableMultiSort`; if
373
+ * neither is set, accessor columns can multi-sort by default.
360
374
  *
361
375
  * @example
362
376
  * ```ts
363
- * const value = column_getCanMultiSort(column)
377
+ * const canMultiSort = column_getCanMultiSort(column)
364
378
  * ```
365
379
  */
366
380
  export function column_getCanMultiSort<
@@ -376,13 +390,14 @@ export function column_getCanMultiSort<
376
390
  }
377
391
 
378
392
  /**
379
- * Returns is sorted for a column.
393
+ * Reads this column's current sort direction.
380
394
  *
381
- * This derives the value from the column definition, table options, and the feature state atoms registered on the table.
395
+ * The result is `false` when the column is not sorted, otherwise `'asc'` or
396
+ * `'desc'` based on the column's entry in `state.sorting`.
382
397
  *
383
398
  * @example
384
399
  * ```ts
385
- * const value = column_getIsSorted(column)
400
+ * const direction = column_getIsSorted(column)
386
401
  * ```
387
402
  */
388
403
  export function column_getIsSorted<
@@ -397,13 +412,13 @@ export function column_getIsSorted<
397
412
  }
398
413
 
399
414
  /**
400
- * Returns sort index for a column.
415
+ * Finds this column's position in the ordered `state.sorting` array.
401
416
  *
402
- * This derives the value from the column definition, table options, and the feature state atoms registered on the table.
417
+ * The result is `-1` when the column is not sorted.
403
418
  *
404
419
  * @example
405
420
  * ```ts
406
- * const value = column_getSortIndex(column)
421
+ * const index = column_getSortIndex(column)
407
422
  * ```
408
423
  */
409
424
  export function column_getSortIndex<
@@ -418,13 +433,13 @@ export function column_getSortIndex<
418
433
  }
419
434
 
420
435
  /**
421
- * Clear Sorting. for a column.
436
+ * Removes this column from the sorting state.
422
437
  *
423
- * This is the static implementation behind the matching column instance API.
438
+ * Other sorted columns are preserved, including their relative order.
424
439
  *
425
440
  * @example
426
441
  * ```ts
427
- * const value = column_clearSorting(column)
442
+ * column_clearSorting(column)
428
443
  * ```
429
444
  */
430
445
  export function column_clearSorting<
@@ -439,13 +454,15 @@ export function column_clearSorting<
439
454
  }
440
455
 
441
456
  /**
442
- * Returns an event handler for toggling sorting handler.
457
+ * Creates a header event handler that toggles this column's sorting.
443
458
  *
444
- * The handler is intended for direct use in column header controls such as buttons or checkboxes.
459
+ * The handler ignores events when the column cannot sort, persists React-style
460
+ * synthetic events when present, and asks `options.isMultiSortEvent` whether
461
+ * the event should add to a multi-sort.
445
462
  *
446
463
  * @example
447
464
  * ```ts
448
- * const value = column_getToggleSortingHandler(column)
465
+ * const onClick = column_getToggleSortingHandler(column)
449
466
  * ```
450
467
  */
451
468
  export function column_getToggleSortingHandler<
@@ -4,7 +4,10 @@ import type { Row } from '../types/Row'
4
4
  import type { AggregationFn } from '../features/column-grouping/columnGroupingFeature.types'
5
5
 
6
6
  /**
7
- * Aggregation function for summing up the values of a column.
7
+ * Sums numeric child-row values for a grouped column.
8
+ *
9
+ * Non-number values contribute `0`. Child rows are used so nested group totals
10
+ * can reuse already aggregated values.
8
11
  */
9
12
  export const aggregationFn_sum: AggregationFn<any, any> = <
10
13
  TFeatures extends TableFeatures,
@@ -23,7 +26,10 @@ export const aggregationFn_sum: AggregationFn<any, any> = <
23
26
  }
24
27
 
25
28
  /**
26
- * Aggregation function for finding the minimum value of a column.
29
+ * Finds the minimum numeric child-row value for a grouped column.
30
+ *
31
+ * Nullish and non-number values are ignored. Returns `undefined` when no
32
+ * numeric value is found.
27
33
  */
28
34
  export const aggregationFn_min: AggregationFn<any, any> = <
29
35
  TFeatures extends TableFeatures,
@@ -51,7 +57,10 @@ export const aggregationFn_min: AggregationFn<any, any> = <
51
57
  }
52
58
 
53
59
  /**
54
- * Aggregation function for finding the maximum value of a column.
60
+ * Finds the maximum numeric child-row value for a grouped column.
61
+ *
62
+ * Nullish and non-number values are ignored. Returns `undefined` when no
63
+ * numeric value is found.
55
64
  */
56
65
  export const aggregationFn_max: AggregationFn<any, any> = <
57
66
  TFeatures extends TableFeatures,
@@ -78,7 +87,10 @@ export const aggregationFn_max: AggregationFn<any, any> = <
78
87
  }
79
88
 
80
89
  /**
81
- * Aggregation function for finding the extent (min and max) of a column.
90
+ * Finds the numeric extent for a grouped column.
91
+ *
92
+ * Returns `[min, max]`, where each entry is `undefined` when no numeric value is
93
+ * present.
82
94
  */
83
95
  export const aggregationFn_extent: AggregationFn<any, any> = <
84
96
  TFeatures extends TableFeatures,
@@ -107,7 +119,10 @@ export const aggregationFn_extent: AggregationFn<any, any> = <
107
119
  }
108
120
 
109
121
  /**
110
- * Aggregation function for finding the mean (average) of a column.
122
+ * Averages numeric leaf-row values for a grouped column.
123
+ *
124
+ * Number-like values are coerced with unary `+`; nullish and non-numeric values
125
+ * are ignored.
111
126
  */
112
127
  export const aggregationFn_mean: AggregationFn<any, any> = <
113
128
  TFeatures extends TableFeatures,
@@ -139,7 +154,10 @@ export const aggregationFn_mean: AggregationFn<any, any> = <
139
154
  }
140
155
 
141
156
  /**
142
- * Aggregation function for finding the median value of a column.
157
+ * Computes the median of numeric leaf-row values for a grouped column.
158
+ *
159
+ * All values must be numbers. If any value is non-numeric, or no leaf rows are
160
+ * present, the result is `undefined`.
143
161
  */
144
162
  export const aggregationFn_median: AggregationFn<any, any> = <
145
163
  TFeatures extends TableFeatures,
@@ -171,7 +189,9 @@ export const aggregationFn_median: AggregationFn<any, any> = <
171
189
  }
172
190
 
173
191
  /**
174
- * Aggregation function for finding the unique values of a column.
192
+ * Collects unique leaf-row values for a grouped column.
193
+ *
194
+ * Values are compared with JavaScript `Set` semantics.
175
195
  */
176
196
  export const aggregationFn_unique: AggregationFn<any, any> = <
177
197
  TFeatures extends TableFeatures,
@@ -188,7 +208,9 @@ export const aggregationFn_unique: AggregationFn<any, any> = <
188
208
  }
189
209
 
190
210
  /**
191
- * Aggregation function for finding the count of unique values of a column.
211
+ * Counts unique leaf-row values for a grouped column.
212
+ *
213
+ * Values are compared with JavaScript `Set` semantics.
192
214
  */
193
215
  export const aggregationFn_uniqueCount: AggregationFn<any, any> = <
194
216
  TFeatures extends TableFeatures,
@@ -205,7 +227,9 @@ export const aggregationFn_uniqueCount: AggregationFn<any, any> = <
205
227
  }
206
228
 
207
229
  /**
208
- * Aggregation function for counting the number of rows in a column.
230
+ * Counts the number of leaf rows in the group.
231
+ *
232
+ * The column id is ignored because the result is based only on group size.
209
233
  */
210
234
  export const aggregationFn_count: AggregationFn<any, any> = <
211
235
  TFeatures extends TableFeatures,
@@ -6,7 +6,9 @@ import type { FilterFn } from '../features/column-filtering/columnFilteringFeatu
6
6
  // Basic filters
7
7
 
8
8
  /**
9
- * Filter function for checking if a value is exactly equal to a given value. (JS === comparison)
9
+ * Keeps rows whose column value is strictly equal to the filter value.
10
+ *
11
+ * Uses JavaScript `===` comparison and auto-removes empty filter values.
10
12
  */
11
13
  export const filterFn_equals: FilterFn<any, any> = <
12
14
  TFeatures extends TableFeatures,
@@ -22,7 +24,10 @@ export const filterFn_equals: FilterFn<any, any> = <
22
24
  filterFn_equals.autoRemove = (val: any) => testFalsy(val)
23
25
 
24
26
  /**
25
- * Filter function for checking if a value is weakly equal to a given value. (JS == comparison)
27
+ * Keeps rows whose column value is loosely equal to the filter value.
28
+ *
29
+ * Uses JavaScript `==` comparison and auto-removes empty filter values. This is
30
+ * useful for matching string input against numeric row values.
26
31
  */
27
32
  export const filterFn_weakEquals: FilterFn<any, any> = <
28
33
  TFeatures extends TableFeatures,
@@ -40,7 +45,9 @@ filterFn_weakEquals.autoRemove = (val: any) => testFalsy(val)
40
45
  // String filters
41
46
 
42
47
  /**
43
- * Filter function for checking if a string includes a given substring. (Case-sensitive)
48
+ * Keeps rows whose stringified column value includes the filter text.
49
+ *
50
+ * Matching is case-sensitive and empty filter values are auto-removed.
44
51
  */
45
52
  export const filterFn_includesStringSensitive: FilterFn<any, any> = <
46
53
  TFeatures extends TableFeatures,
@@ -58,7 +65,10 @@ export const filterFn_includesStringSensitive: FilterFn<any, any> = <
58
65
  filterFn_includesStringSensitive.autoRemove = (val: any) => testFalsy(val)
59
66
 
60
67
  /**
61
- * Filter function for checking if a string includes a given substring. (Non-case-sensitive)
68
+ * Keeps rows whose stringified column value includes the filter text.
69
+ *
70
+ * Both values are lowercased before comparison, and empty filter values are
71
+ * auto-removed.
62
72
  */
63
73
  export const filterFn_includesString: FilterFn<any, any> = <
64
74
  TFeatures extends TableFeatures,
@@ -80,7 +90,10 @@ export const filterFn_includesString: FilterFn<any, any> = <
80
90
  filterFn_includesString.autoRemove = (val: any) => testFalsy(val)
81
91
 
82
92
  /**
83
- * Filter function for checking if a string is exactly equal to a given string. (Non-case-sensitive)
93
+ * Keeps rows whose stringified column value equals the filter text.
94
+ *
95
+ * Both values are lowercased before comparison, and empty filter values are
96
+ * auto-removed.
84
97
  */
85
98
  export const filterFn_equalsString: FilterFn<any, any> = <
86
99
  TFeatures extends TableFeatures,
@@ -99,7 +112,9 @@ export const filterFn_equalsString: FilterFn<any, any> = <
99
112
  filterFn_equalsString.autoRemove = (val: any) => testFalsy(val)
100
113
 
101
114
  /**
102
- * Filter function for checking if a string is exactly equal to a given string. (Case-sensitive)
115
+ * Keeps rows whose stringified column value exactly equals the filter text.
116
+ *
117
+ * Matching is case-sensitive and empty filter values are auto-removed.
103
118
  */
104
119
  export const filterFn_equalsStringSensitive: FilterFn<any, any> = <
105
120
  TFeatures extends TableFeatures,
@@ -117,7 +132,10 @@ filterFn_equalsStringSensitive.autoRemove = (val: any) => testFalsy(val)
117
132
  // Number filters
118
133
 
119
134
  /**
120
- * Filter function for checking if a number is greater than a given number.
135
+ * Keeps rows whose value is greater than the filter value.
136
+ *
137
+ * Numeric values are compared numerically when both sides can be coerced to
138
+ * numbers; otherwise normalized strings are compared.
121
139
  */
122
140
  export const filterFn_greaterThan: FilterFn<any, any> = <
123
141
  TFeatures extends TableFeatures,
@@ -144,7 +162,9 @@ export const filterFn_greaterThan: FilterFn<any, any> = <
144
162
  filterFn_greaterThan.resolveFilterValue = (val: any) => testFalsy(val)
145
163
 
146
164
  /**
147
- * Filter function for checking if a number is greater than or equal to a given number.
165
+ * Keeps rows whose value is greater than or equal to the filter value.
166
+ *
167
+ * Delegates to the built-in greater-than and equality comparisons.
148
168
  */
149
169
  export const filterFn_greaterThanOrEqualTo: FilterFn<any, any> = <
150
170
  TFeatures extends TableFeatures,
@@ -163,7 +183,9 @@ export const filterFn_greaterThanOrEqualTo: FilterFn<any, any> = <
163
183
  filterFn_greaterThanOrEqualTo.resolveFilterValue = (val: any) => testFalsy(val)
164
184
 
165
185
  /**
166
- * Filter function for checking if a number is less than a given number.
186
+ * Keeps rows whose value is less than the filter value.
187
+ *
188
+ * This is implemented as the inverse of greater-than-or-equal comparison.
167
189
  */
168
190
  export const filterFn_lessThan: FilterFn<any, any> = <
169
191
  TFeatures extends TableFeatures,
@@ -179,7 +201,9 @@ export const filterFn_lessThan: FilterFn<any, any> = <
179
201
  filterFn_lessThan.resolveFilterValue = (val: any) => testFalsy(val)
180
202
 
181
203
  /**
182
- * Filter function for checking if a number is less than or equal to a given number.
204
+ * Keeps rows whose value is less than or equal to the filter value.
205
+ *
206
+ * This is implemented as the inverse of greater-than comparison.
183
207
  */
184
208
  export const filterFn_lessThanOrEqualTo: FilterFn<any, any> = <
185
209
  TFeatures extends TableFeatures,
@@ -197,7 +221,9 @@ filterFn_lessThanOrEqualTo.resolveFilterValue = (val: any) => testFalsy(val)
197
221
  // Range filters
198
222
 
199
223
  /**
200
- * Filter function for checking if a number or a string is between two given values.
224
+ * Keeps rows whose value falls between an exclusive min/max pair.
225
+ *
226
+ * Blank range endpoints are treated as open-ended.
201
227
  */
202
228
  const filterFn_between: FilterFn<any, any> = <
203
229
  TFeatures extends TableFeatures,
@@ -218,7 +244,9 @@ const filterFn_between: FilterFn<any, any> = <
218
244
  filterFn_between.autoRemove = (val: any) => !val
219
245
 
220
246
  /**
221
- * Filter function for checking if a number or a string is between two given values or equal to them.
247
+ * Keeps rows whose value falls between an inclusive min/max pair.
248
+ *
249
+ * Blank range endpoints are treated as open-ended.
222
250
  */
223
251
  const filterFn_betweenInclusive: FilterFn<any, any> = <
224
252
  TFeatures extends TableFeatures,
@@ -239,7 +267,10 @@ const filterFn_betweenInclusive: FilterFn<any, any> = <
239
267
  filterFn_betweenInclusive.autoRemove = (val: any) => !val
240
268
 
241
269
  /**
242
- * Filter function for checking if a number is within a given range.
270
+ * Keeps rows whose numeric value is inside an inclusive `[min, max]` range.
271
+ *
272
+ * Filter values are normalized so blank endpoints become open-ended and
273
+ * reversed endpoints are swapped.
243
274
  */
244
275
  export const filterFn_inNumberRange: FilterFn<any, any> = <
245
276
  TFeatures extends TableFeatures,
@@ -282,7 +313,7 @@ filterFn_inNumberRange.autoRemove = (val: any) =>
282
313
  // Array filters
283
314
 
284
315
  /**
285
- * Filter function for checking if an array has a given value.
316
+ * Keeps rows whose scalar column value equals at least one filter value.
286
317
  */
287
318
  export const filterFn_arrHas: FilterFn<any, any> = <
288
319
  TFeatures extends TableFeatures,
@@ -296,7 +327,7 @@ export const filterFn_arrHas: FilterFn<any, any> = <
296
327
  }
297
328
 
298
329
  /**
299
- * Filter function for checking if an array includes a given value.
330
+ * Keeps rows whose array or string column value includes at least one filter value.
300
331
  */
301
332
  export const filterFn_arrIncludes: FilterFn<any, any> = <
302
333
  TFeatures extends TableFeatures,
@@ -316,7 +347,7 @@ export const filterFn_arrIncludes: FilterFn<any, any> = <
316
347
  filterFn_arrIncludes.autoRemove = (val: any) => testFalsy(val) || !val?.length
317
348
 
318
349
  /**
319
- * Filter function for checking if an array includes all of the given values.
350
+ * Keeps rows whose array column value includes every filter value.
320
351
  */
321
352
  export const filterFn_arrIncludesAll: FilterFn<any, any> = <
322
353
  TFeatures extends TableFeatures,
@@ -335,7 +366,7 @@ filterFn_arrIncludesAll.autoRemove = (val: any) =>
335
366
  testFalsy(val) || !val?.length
336
367
 
337
368
  /**
338
- * Filter function for checking if an array includes any of the given values.
369
+ * Keeps rows whose array column value includes at least one filter value.
339
370
  */
340
371
  export const filterFn_arrIncludesSome: FilterFn<any, any> = <
341
372
  TFeatures extends TableFeatures,
@@ -78,16 +78,21 @@ export type ColumnHelper<
78
78
  }
79
79
 
80
80
  /**
81
- * A helper utility for creating column definitions with slightly better type inference for each individual column.
82
- * The `TValue` generic is inferred based on the accessor key or function provided.
83
- * **Note:** From a JavaScript perspective, the functions in these helpers do not do anything. They are only used to help TypeScript infer the correct types for the column definitions.
81
+ * Creates helper functions for authoring column definitions with stronger value
82
+ * inference.
83
+ *
84
+ * `accessor` infers `TValue` from an accessor key or accessor function,
85
+ * `display` creates non-data columns, `group` creates parent columns, and
86
+ * `columns` preserves tuple-level value types for arrays. At runtime these
87
+ * helpers only return column definition objects.
88
+ *
84
89
  * @example
85
90
  * ```tsx
86
91
  * const helper = createColumnHelper<typeof _features, Person>() // _features is the result of `tableFeatures({})` helper
87
92
  * const columns = [
88
93
  * helper.display({ id: 'actions', header: 'Actions' }),
89
94
  * helper.accessor('firstName', {}),
90
- * helper.accessor((row) => row.lastName, {}
95
+ * helper.accessor((row) => row.lastName, { id: 'lastName' }),
91
96
  * ]
92
97
  * ```
93
98
  */
@@ -3,9 +3,10 @@ import type { TableFeatures } from '../types/TableFeatures'
3
3
  import type { TableOptions } from '../types/TableOptions'
4
4
 
5
5
  /**
6
- * Returns table options while preserving generic inference.
6
+ * Preserves table option inference when reusable options omit `columns`.
7
7
  *
8
- * This helper is useful when composing reusable table options outside of a framework adapter call.
8
+ * This is useful for composing shared options that will receive columns later
9
+ * from a framework adapter or table factory.
9
10
  */
10
11
  export function tableOptions<
11
12
  TFeatures extends TableFeatures,
@@ -19,7 +20,7 @@ export function tableOptions<
19
20
  }
20
21
 
21
22
  /**
22
- * Returns table options while preserving generic inference when `data` is supplied later.
23
+ * Preserves table option inference when reusable options omit `data`.
23
24
  */
24
25
  export function tableOptions<
25
26
  TFeatures extends TableFeatures,
@@ -33,7 +34,8 @@ export function tableOptions<
33
34
  }
34
35
 
35
36
  /**
36
- * Returns table options while preserving generic inference when both `data` and `columns` are supplied later.
37
+ * Preserves table option inference when reusable options omit both `data` and
38
+ * `columns`.
37
39
  */
38
40
  export function tableOptions<
39
41
  TFeatures extends TableFeatures,
@@ -47,7 +49,7 @@ export function tableOptions<
47
49
  }
48
50
 
49
51
  /**
50
- * Returns a fully specified table options object without changing its runtime value.
52
+ * Preserves inference for a fully specified table options object.
51
53
  */
52
54
  export function tableOptions<
53
55
  TFeatures extends TableFeatures,
@@ -55,7 +57,7 @@ export function tableOptions<
55
57
  >(options: TableOptions<TFeatures, TData>): TableOptions<TFeatures, TData>
56
58
 
57
59
  /**
58
- * Returns table options while preserving generic inference when `_features` is supplied by a wrapper.
60
+ * Preserves inference when a wrapper supplies `_features`.
59
61
  */
60
62
  export function tableOptions<
61
63
  TFeatures extends TableFeatures,
@@ -65,7 +67,7 @@ export function tableOptions<
65
67
  ): Omit<TableOptions<TFeatures, TData>, '_features'>
66
68
 
67
69
  /**
68
- * Returns table options while preserving generic inference when `data` and `_features` are supplied by a wrapper.
70
+ * Preserves inference when a wrapper supplies both `data` and `_features`.
69
71
  */
70
72
  export function tableOptions<
71
73
  TFeatures extends TableFeatures,
@@ -75,7 +77,7 @@ export function tableOptions<
75
77
  ): Omit<TableOptions<TFeatures, TData>, 'data' | '_features'>
76
78
 
77
79
  /**
78
- * Returns table options while preserving generic inference when `columns` and `_features` are supplied by a wrapper.
80
+ * Preserves inference when a wrapper supplies both `columns` and `_features`.
79
81
  */
80
82
  export function tableOptions<
81
83
  TFeatures extends TableFeatures,
@@ -85,7 +87,8 @@ export function tableOptions<
85
87
  ): Omit<TableOptions<TFeatures, TData>, 'columns' | '_features'>
86
88
 
87
89
  /**
88
- * Returns table options while preserving generic inference when `data`, `columns`, and `_features` are supplied by a wrapper.
90
+ * Preserves inference when a wrapper supplies `data`, `columns`, and
91
+ * `_features`.
89
92
  */
90
93
  export function tableOptions<
91
94
  TFeatures extends TableFeatures,