ReturnType extracts return type of a function.
ReturnType
Is there a way to define ArgumentsType that extracts parameter types of a
ArgumentsType
As of TypeScript 3.1, Parameters type is now a part of the standard library.
Parameters
type Result = Parameters<(a: number, b: string) => boolean>; // [number, string]