Skip to main content
Module

x/evt/tools/typeSafety/UnpackPromise.ts

💧EventEmitter's typesafe replacement
Go to Latest
File

/** * Usecase: * declare const pr: Promise<string[]>; * const x: Unpack<typeof pr>; <== x is string[] */export type UnpackPromise<T> = T extends PromiseLike<infer U> ? U : never;