devtypes
    Preparing search index...

    Type Alias UnwrapPromise<T>

    UnwrapPromise: T extends Promise<infer U> ? U : T

    Unwrap a Promise type (built-in Awaited exists in newer TS)

    Type Parameters

    • T
    type P = Promise<string>;
    type U = UnwrapPromise<P>; // string