/** * @format * * These are where we put all the type aliases, interfaces, and enumerations that are shared * between multiple things, or may be useful to use without us. * * @packageDocumentation */ /// /** * Provides the type of elements within an `Iterable`, which may be wrapped in one or more promises. * The element type is also unwrapped any promises. */ export declare type Item = Unpromise extends Array ? U : Unpromise extends Iterable ? U : never; /** * Provides the type of the resolution value after unwrapping all the `PromiseLike` and [[`Promisable`]] interfaces (if any). */ export declare type Unpromise = T extends PromiseLike ? Unpromise : T extends Promisable ? U extends T ? T : Unpromise : T; /** * Something which can be resolved: that is, either a value or a promise of a value. */ export declare type Promisable = T | PromiseLike; /** * Guarantees that there is only one `Promise` wrapper. */ export declare type SimplifiedPromise = Promise>; /** * Guarantees that there is only one `PromiseLike` wrapper. */ export declare type SimplifiedPromiseLike = PromiseLike>; /** * Guarantees that there is at most one `PromiseLike` wrapper. */ export declare type SimplifiedPromisable = Promisable>; /** * An `Iterable` or a promise of an `Iterable`. Its elements are any mix of type `T` and/or `PromiseLike`. * Used as a type for arguments. */ export declare type PromisableIterable = Promisable>; /** * Represents an `Iterable` that is not a promise but an actual value that is an `Iterable`, * although it may produce either values or promises of values or both. */ export declare type IterableOfPromisables = Iterable>; /** * Represents a `PromiseSettledResult` value for a fulfilled promise. */ export declare class Fulfillment implements PromiseFulfilledResult { readonly value: T; constructor(value: T); get status(): "fulfilled"; } /** * Represents a `PromiseSettledResult` value for a rejected promise. */ export declare class Rejection implements PromiseRejectedResult { readonly reason: unknown; constructor(reason: unknown); get status(): "rejected"; } /** * Equivalent to a `PromiseSettledResult`, but specific to our classes. */ export declare type Settlement = PromiseSettledResult & (Fulfillment | Rejection); //# sourceMappingURL=types.d.ts.map