Skip to content

Commit

Permalink
fix: limit deep keys even more
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Sep 15, 2023
1 parent 5fe4bf4 commit 51214a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/table-core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ type AllowedIndexes<
? AllowedIndexes<Tail, Keys | Tail['length']>
: Keys

export type DeepKeys<T, TDepth extends any[] = []> = TDepth['length'] extends 10
export type DeepKeys<T, TDepth extends any[] = []> = TDepth['length'] extends 5
? never
: unknown extends T
? keyof T
? string
: 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'
? DeepKeys<T[number], [...TDepth, any]>
: T extends Date
? never
: T extends object
Expand Down

0 comments on commit 51214a8

Please sign in to comment.