ReturnOf

ReturnOf was a workaround solution permitting type inference on function returns in TypeScript.

Getting the return type of a function is something particularly interesting, in case of Redux Action Creators or React-Redux containers, to prevent code duplication, for example.

I had also opened a proposal on TypeScript static type inference, enabling a static-only solution for return type inference.

TypeScript 2.8 finally introduced Conditional Types, and added a new ReturnType using a new infer keyword.