You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I don't like about this is the T extends object generic. Because of this selectFooBar will appear to accept any object. I really want to end up with
馃 Question
I'm trying to write a curried "select" function which plucks a value from inside a given object. The type for the non-curried version looks like this:
For the curried version, the best I've come up with is this:
What I don't like about this is the
T extends object
generic. Because of thisselectFooBar
will appear to accept any object. I really want to end up withTo do that I think I need to construct the type
{foo: {bar: any}}
from["foo", "bar"]
. Is that possible?Search tags, topics
#typescript #path #get #select #curry
The text was updated successfully, but these errors were encountered: