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