dingxyang/type-challenges

2 - 获取函数返回类型

dingxyang opened this issue · 0 comments

type MyReturnType<T extends (...args : any)  => any> =  T extends (...args : any) => infer R ? R : any;