📜  获取函数返回类型打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:31.660000             🧑  作者: Mango

代码示例1
type return_type = ReturnType<() => string>; // string
// or
function hello_world(): string {
  return "hello world";
}
type return_type = ReturnType; // string