ReturnType<Type>
Extracts the return type of a function type.
It is a useful way to keep types in sync, especially when working with callbacks and APIs.
It is also useful in situations where you might otherwise have to type out the structure of a function's return type.
You can implement ReturnType
with infer
.