type-challenges icon indicating copy to clipboard operation
type-challenges copied to clipboard

2 - Get Return Type

Open Tubring25 opened this issue 9 months ago • 0 comments

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

Tubring25 avatar May 08 '24 09:05 Tubring25