export type AsyncResult = [TResult | null, TError | null]; /** * Type for supporting methodes with parameters * @since 1.1.1 */ export type PromiseFunc = (...args: any) => Promise; /** * A wrapper function to handle an await function and their results/errors * * @template TResult Type of expected result * @template TError Type of expected error * @param {PromiseFunc} promiseFn The asynchronous function to wait for * @param {any} promiseFnArgs A set of arguments to be passed to the function (since 1.1.1) * @return {Promise>} * @since 1.1.0 * @example const [result, error] = await asyncFn(myPromiseFunc, true, 2000); * @example const [result, error] = await asyncFn(this.myPromiseFunc.bind(this), true, null, 'abc'); */ export default function asyncFn(promiseFn: PromiseFunc, ...promiseFnArgs: any): Promise>; //# sourceMappingURL=asyncFn.d.ts.map