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

Support for paths #237

Open
sluukkonen opened this issue Apr 7, 2021 · 0 comments
Open

Support for paths #237

sluukkonen opened this issue Apr 7, 2021 · 0 comments

Comments

@sluukkonen
Copy link
Owner

sluukkonen commented Apr 7, 2021

It might be nice to support paths in addition to props and arrays

Something like

Operation Object Array Path
get prop nth path
getOr propOr nthOr pathOr
set setProp setNth setPath
modify modifyProp modifyNth modifyPath
remove removeProp removeNth removePath
equals propEquals nthEquals pathEquals
satisfies propSatisfies nthSatisfies pathSatisfies

It's unclear to me if TypeScript ergonomics can be sufficiently good, but presumably the implementation would use either template literal types or tuples with recursive conditional types.

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