Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/tsafe/index.ts>ReturnType

🔩 The missing TypeScript utils
Go to Latest
type alias ReturnType
import { type ReturnType } from "https://deno.land/x/tsafe@v1.6.1/index.ts";

Type Parameters

T extends
| ((...args: any[]) => unknown)
| undefined
| null
| false
| ""
definition: T extends (...args: any[]) => infer R ? (R extends PromiseLike<infer J> ? J : R) : never