Replies: 1 comment
-
Also looking to use dot path notation within object keys and arrays. Any guidance would be much appreciated! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The AutoPath function is quite cool, but it's not clear (to me) if it's possible to use/implement the AutoPath function such that it applies to the keys of an object.
For example, Mongo allows you to perform an update with the "$set" operator, such as:
I'd like to add typing to a function that mimics that behaviour (and also to a function that will execute a Mongo update using the "$set" operator, but we'll stick with the mimic functionality example for now):
In the above example, is it possible to use AutoPath (or something else) to type the keys (and values) of the
dottedKeyVals
object (and maybe the updated obj return type as well? Though I guess that should just be T)?Maybe this asking a bit much, though. Maybe it's a "more trouble than it's worth" situation. 😅
Beta Was this translation helpful? Give feedback.
All reactions