import { isPromiseLike as _isPromiseLike } from './isPromiseLike'; /** * Registers a catch handler for the Promise. * @param fn - the catch handler * @returns a Promise for the completion of the callback * ```typescript * pipe( * Promises.reject('failed'), * Promises.catch(err => console.log(err)) // logs: failed * ); * ``` */ declare const _catch: (fn: (err: any) => B | Promise) => (promise: Promise) => Promise; /** * Registers a handler for the Promise. * @param fn - the handler * @param catchFn - the optional catch handler * @returns a Promise for the completion of the callback * ```typescript * pipe( * Promises.resolve(5), * Promises.then(num => num + 2) // -> Promise(5) * ); * ``` */ export declare const then: (fn: (val: A) => B | Promise, catchFn?: ((err: any) => B | Promise) | undefined) => (promise: Promise) => Promise; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. * @param values - An array of Promises * @returns a new Promise */ export declare const all: any; /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. * @param values - An array of Promises * @returns a new Promise */ export declare const race: any; /** * Creates a new resolved promise for the provided value. * @param value - A promise * @returns a promise whose internal state matches the provided promise */ export declare const resolve: any; /** * Creates a new rejected promise for the provided reason. * @param reason - The reason the promise was rejected. * @returns a new rejected Promise. */ export declare const reject: any; /** * Determines whether or not an object is promise-like (i.e. "thenable"). * @param obj - the object to check * @returns true if the object is promise-like * ```typescript * pipe( * Promises.resolve(5), * Promises.isPromiseLike() // -> true * ); * ``` */ export declare const isPromiseLike: () => typeof _isPromiseLike; export { _catch as catch };