@tanstack/table-core
Advanced tools
Comparing version 8.9.8 to 8.9.9
@@ -16,4 +16,4 @@ import { TableState, Updater } from './types'; | ||
type AllowedIndexes<Tuple extends ReadonlyArray<any>, Keys extends number = never> = Tuple extends readonly [] ? Keys : Tuple extends readonly [infer _, ...infer Tail] ? AllowedIndexes<Tail, Keys | Tail['length']> : Keys; | ||
export type DeepKeys<T> = unknown extends T ? keyof T : object extends T ? string : T extends readonly any[] & IsTuple<T> ? AllowedIndexes<T> | DeepKeysPrefix<T, AllowedIndexes<T>> : T extends any[] ? never & 'Dynamic length array indexing is not supported' : T extends Date ? never : T extends object ? (keyof T & string) | DeepKeysPrefix<T, keyof T> : never; | ||
type DeepKeysPrefix<T, TPrefix> = TPrefix extends keyof T & (number | string) ? `${TPrefix}.${DeepKeys<T[TPrefix]> & string}` : never; | ||
export type DeepKeys<T, TDepth extends any[] = []> = TDepth['length'] extends 10 ? never : unknown extends T ? keyof T : object extends T ? string : T extends readonly any[] & IsTuple<T> ? AllowedIndexes<T> | DeepKeysPrefix<T, AllowedIndexes<T>, TDepth> : T extends any[] ? never & 'Dynamic length array indexing is not supported' : T extends Date ? never : T extends object ? (keyof T & string) | DeepKeysPrefix<T, keyof T, TDepth> : never; | ||
type DeepKeysPrefix<T, TPrefix, TDepth extends any[]> = TPrefix extends keyof T & (number | string) ? `${TPrefix}.${DeepKeys<T[TPrefix], [...TDepth, any]> & string}` : never; | ||
export type DeepValue<T, TProp> = T extends Record<string | number, any> ? TProp extends `${infer TBranch}.${infer TDeepProp}` ? DeepValue<T[TBranch], TDeepProp> : T[TProp & string] : never; | ||
@@ -20,0 +20,0 @@ export type NoInfer<T> = [T][T extends any ? 0 : never]; |
{ | ||
"name": "@tanstack/table-core", | ||
"author": "Tanner Linsley", | ||
"version": "8.9.8", | ||
"version": "8.9.9", | ||
"description": "Headless UI for building powerful tables & datagrids for TS/JS.", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -46,3 +46,5 @@ import { TableState, Updater } from './types' | ||
export type DeepKeys<T> = unknown extends T | ||
export type DeepKeys<T, TDepth extends any[] = []> = TDepth['length'] extends 10 | ||
? never | ||
: unknown extends T | ||
? keyof T | ||
@@ -52,3 +54,3 @@ : object extends T | ||
: T extends readonly any[] & IsTuple<T> | ||
? AllowedIndexes<T> | DeepKeysPrefix<T, AllowedIndexes<T>> | ||
? AllowedIndexes<T> | DeepKeysPrefix<T, AllowedIndexes<T>, TDepth> | ||
: T extends any[] | ||
@@ -59,7 +61,11 @@ ? never & 'Dynamic length array indexing is not supported' | ||
: T extends object | ||
? (keyof T & string) | DeepKeysPrefix<T, keyof T> | ||
? (keyof T & string) | DeepKeysPrefix<T, keyof T, TDepth> | ||
: never | ||
type DeepKeysPrefix<T, TPrefix> = TPrefix extends keyof T & (number | string) | ||
? `${TPrefix}.${DeepKeys<T[TPrefix]> & string}` | ||
type DeepKeysPrefix< | ||
T, | ||
TPrefix, | ||
TDepth extends any[] | ||
> = TPrefix extends keyof T & (number | string) | ||
? `${TPrefix}.${DeepKeys<T[TPrefix], [...TDepth, any]> & string}` | ||
: never | ||
@@ -66,0 +72,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2480236
20986