Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/tsafe/index.ts>UnpackPromise

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

Use case: declare const pr: Promise<string[]>; const x: UnpackPromise; <== x is string[]

Type Parameters

T extends
| PromiseLike<unknown>
| undefined
| null
| false
| ""
definition: T extends PromiseLike<infer U> ? U : never