key paths for recursive nested types
Hey all, I have the following type
and am trying to build out a type that represents all the possible key paths that could be created through the nesting of properties or items.
I've tried a few patterns and have had chatGPT spit types out, but none of them seem to work. The closest thing I could get to was this
For now, I've settled to using regex through zod to represent the type
If anyone knows the solution to this, please do let me know
and am trying to build out a type that represents all the possible key paths that could be created through the nesting of properties or items.
I've tried a few patterns and have had chatGPT spit types out, but none of them seem to work. The closest thing I could get to was this
For now, I've settled to using regex through zod to represent the type
If anyone knows the solution to this, please do let me know
