devtypes - v1.1.0
    Preparing search index...

    Type Alias UnwrapPromise<T>

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

    Unwrap a Promise type.

    Type Parameters

    • T

      Type to unwrap

    Extracts the resolved value type of a Promise. Returns type as-is if not a Promise.

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