Is it possible to let "selectorFamily" support data whose type should be inferred by parameter? #1081
babyfish-ct
started this conversation in
Ideas
Replies: 2 comments
-
Impossible! I spent a whole day researching this problem and found that it seemed to be an impossible goal. Realizing this goal in a universal way is an illusion. Creating wrapper function for "selectorFamily" according to the specific situation seems to be the only way |
Beta Was this translation helpful? Give feedback.
0 replies
-
eg: <T1, T2>(a: A, b: B, c: C, t1: T1, t2: T2) => [D, T1 & T2]
|
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
-
I published a framework graphql-ts-client,it can automatically infer queried data type according to strongly-type graphql request.
So I met a problem, I wish the returned function of "selectorFamily" can determine return type by parameter type.
Finally, I supported three wrapper functions for "selectorFamily" in FetchableSelectorFamily.ts.
The comparison in this table can describe my request very clearly, is it possible to let"selectorFamily" support data whose type should be inferred by parameter?
Beta Was this translation helpful? Give feedback.
All reactions