Preguntas etiquetadas con typescript1.8

101
Obtener el tipo de retorno de una función

Tengo la siguiente función: function test(): number { return 42; } Puedo obtener el tipo de función usando typeof: type t = typeof test; Aquí testará () => number. ¿Hay alguna forma de obtener el tipo de retorno de la función? Me gustaría tser en numberlugar de () => number....