dot-path-value
dot-path-value copied to clipboard
`Path<T>` with numbered object keys
It seems that Path
doesn't pick out object keys which are numbers, rather than strings. For example:
const obj = {
days: {
1: true,
"2": false,
3: true
}
}
type PathObj = Path<typeof obj>;
// ^? type PathObj = 'days' | 'days.2'
Example playground for reference