import { Func } from '../typings/types'; interface ResolveWith { (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 resolves with a value returned * by the supplied function when passed the supplied payload * * @param {Function} func * @param {*[]} payload * @returns {Promise} * @example * rejectWith(toLowerCase, 'OK').then( res => console.info(res) );// => 'ok' */ declare const _default: ResolveWith; export default _default;