Question:I want to infer the values of a nested selector. Meaning that the second selector uses the result of the first selector as an argument to select a sub piece of this value.
Answer:You can simplify it a bit:
You need to add extra generic for callback return type. TS is able to infer it. If you are interested on function arguments inference you can check my article
If you have better answer, please add a comment about this, thank you!