/** * Promise detection that handles various Promise implementations * and reduces false positives from objects with coincidental 'then' methods */ export declare function isPromiseLike(value: any): value is Promise; /** Unique private symbol to indicate async functions wrapped in Player's await function */ export declare const AwaitableSymbol: unique symbol; /** * Wrapper for Promises that are generated from the `await` function with a unique symbol so we can * determine when a promise should be awaited by us (as its returned by await) or a promise thats * generated from any async function */ export interface Awaitable extends Promise { /** Prevent unwrapped then from being exposed from underlying promise */ then: never; /** Internalally awaitable wrapper around underlying then function */ awaitableThen(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; /** Symbol to identify this as something returned by await */ [AwaitableSymbol]: symbol; } /** Typeguard for AwaitableResult */ export declare function isAwaitable(val: unknown): val is Awaitable; /** * Wraps Promise.all in AwaitableResult wrapper to allow internal functions to await internally produced promises */ export declare function collateAwaitable(promises: T): Awaitable; /** * Add AwaitableSymbol to base promise and promise returned by then() function */ export declare function makeAwaitable(promise: Promise): Awaitable; //# sourceMappingURL=async.d.ts.map