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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant