Skip to content

Commit

Permalink
fix to satisfy the constraint 'string'
Browse files Browse the repository at this point in the history
  • Loading branch information
aralroca committed Jul 17, 2023
1 parent 00f9419 commit 8489f69
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,13 @@ type Join<S1, S2> = S1 extends string

// @ts-ignore
export type Paths<T> = RemovePlural<
// @ts-ignore
{
[K in keyof T]: T[K] extends Record<string, unknown>
// @ts-ignore
[K in Extract<keyof T, string>]: T[K] extends Record<string, unknown>
? Join<K, Paths<T[K]>>
: K
}[keyof T]
}[Extract<keyof T, string>]
>

// TODO: Remove this in future versions > 2.0.0
Expand Down

0 comments on commit 8489f69

Please sign in to comment.