T
Path
Parse a collection path string into an array of keys
Signature
ts
export type Path<T>
= T extends `${infer Key}.${infer Rest}`
? [Key, ...Path<Rest>]
: T extends `${infer Key}`
? [Key]
: [];Type Parameters
TParse a collection path string into an array of keys
export type Path<T>
= T extends `${infer Key}.${infer Rest}`
? [Key, ...Path<Rest>]
: T extends `${infer Key}`
? [Key]
: [];T