import { Func } from '../typings/types'; interface RejectWith { (func: (a: T1, b: T2, ...args: any[]) => R, a: T1, b: T2, ...args: any[]): Promise; (func: (a: T) => R, a: T): Promise; (func: (a: T1, b: T2, ...payload: any[]) => R): (a: T1, b: T2, ...payload: any[]) => Promise; (func: (a: T) => R): (a: T) => Promise; (func: Func): (...payload: any[]) => Promise; } /** * Returns a promise that rejects with a value returned * by the supplied function when passed the supplied payload * * @param {Function} func * @param {*[]} payload * @returns {Promise} * @example * rejectWith(toLowerCase, 'Error').catch( err => console.error(err) );// => 'error' */ declare const _default: RejectWith; export default _default;