@tanstack/table-core 8.9.8 → 8.9.9
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.
- package/build/lib/index.esm.js.map +1 -1
- package/build/lib/index.mjs.map +1 -1
- package/build/lib/utils.d.ts +2 -2
- package/build/lib/utils.js.map +1 -1
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/utils.ts +11 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/table-core",
|
|
3
3
|
"author": "Tanner Linsley",
|
|
4
|
-
"version": "8.9.
|
|
4
|
+
"version": "8.9.9",
|
|
5
5
|
"description": "Headless UI for building powerful tables & datagrids for TS/JS.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/tanstack/table#readme",
|
package/src/utils.ts
CHANGED
|
@@ -43,22 +43,28 @@ type AllowedIndexes<
|
|
|
43
43
|
? AllowedIndexes<Tail, Keys | Tail['length']>
|
|
44
44
|
: Keys
|
|
45
45
|
|
|
46
|
-
export type DeepKeys<T> =
|
|
46
|
+
export type DeepKeys<T, TDepth extends any[] = []> = TDepth['length'] extends 10
|
|
47
|
+
? never
|
|
48
|
+
: unknown extends T
|
|
47
49
|
? keyof T
|
|
48
50
|
: object extends T
|
|
49
51
|
? string
|
|
50
52
|
: T extends readonly any[] & IsTuple<T>
|
|
51
|
-
? AllowedIndexes<T> | DeepKeysPrefix<T, AllowedIndexes<T
|
|
53
|
+
? AllowedIndexes<T> | DeepKeysPrefix<T, AllowedIndexes<T>, TDepth>
|
|
52
54
|
: T extends any[]
|
|
53
55
|
? never & 'Dynamic length array indexing is not supported'
|
|
54
56
|
: T extends Date
|
|
55
57
|
? never
|
|
56
58
|
: T extends object
|
|
57
|
-
? (keyof T & string) | DeepKeysPrefix<T, keyof T>
|
|
59
|
+
? (keyof T & string) | DeepKeysPrefix<T, keyof T, TDepth>
|
|
58
60
|
: never
|
|
59
61
|
|
|
60
|
-
type DeepKeysPrefix<
|
|
61
|
-
|
|
62
|
+
type DeepKeysPrefix<
|
|
63
|
+
T,
|
|
64
|
+
TPrefix,
|
|
65
|
+
TDepth extends any[]
|
|
66
|
+
> = TPrefix extends keyof T & (number | string)
|
|
67
|
+
? `${TPrefix}.${DeepKeys<T[TPrefix], [...TDepth, any]> & string}`
|
|
62
68
|
: never
|
|
63
69
|
|
|
64
70
|
export type DeepValue<T, TProp> = T extends Record<string | number, any>
|