vue-admin-core
Version:
A Component Library for Vue 3
9 lines (8 loc) • 349 B
TypeScript
/**
* @param { Promise } promise
* @param { Object= } errorExt - Additional Information you can pass to the err object
* @return { Promise }
* @example const [error, data] = await awaitTo(api)
*/
export declare function awaitTo<T, U = Error>(promise: Promise<T>, errorExt?: object): Promise<[U, undefined] | [null, T]>;
export default awaitTo;