From d65c6b6847248889658a49d327c3797e77275667 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Sun, 22 Jan 2023 22:16:44 +0000 Subject: [PATCH] typescript ReturnType<> --- typescript/types/other.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/typescript/types/other.d.ts b/typescript/types/other.d.ts index 2a58b9fe1..8f0d07855 100644 --- a/typescript/types/other.d.ts +++ b/typescript/types/other.d.ts @@ -9,3 +9,5 @@ interface IArguments { // Helper type type Exclude = T extends U ? never : T; + +type ReturnType = T extends (...args: any[]) => infer R ? R : never;