-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add .entries(), .keys(), .values() record traversals #81
base: main
Are you sure you want to change the base?
Conversation
Cool! I have some questions with this API, what would be the best way to do the following? a. add an entry? |
Unfortunately, traversals don’t allow that kind of stuff in general. Introducing something like |
Also, typescript seems to have really hard time to type check certain things with this pr’s modifications, so I’m not sure if this can be merged at all. |
One more thing: If you’re using optics from a JavaScript project (instead of TypeScript), I highly recommend https://github.com/calmm-js/partial.lenses. It’s much more feature complete than optics-ts and supports stuff you mentioned. It’s much harder to implement those in optics-ts because the restrictions imposed by the type system need to be taken into account. |
That's good to know. I was able to use I will have a look at partial.lenses |
What is missing from TypeScript to be able to do this? We're definitely not using JavaScript, so this library seems like our best hope.
What would that API look like? |
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
Are there any blockers from merging and releasing this? |
No description provided.