这可以通过条件类型:
let someFunction: () => String;
let x : ReturnType<typeof someFunction>;
如果您对打字稿团队考虑的设计方案感到好奇,#6606 提供了一个很好的概述。
In case you are curious about the design alternatives the typescript team considered, the discussion in #6606 provides a good overview.