Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path<T> with numbered object keys #15

Open
acurrieclark opened this issue Jun 10, 2023 · 0 comments
Open

Path<T> with numbered object keys #15

acurrieclark opened this issue Jun 10, 2023 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@acurrieclark
Copy link
Contributor

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

@g-makarov g-makarov added help wanted Extra attention is needed in progress and removed help wanted Extra attention is needed in progress labels Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants