UNPKG

es-promise-ext

Version:

Native promise extensions for javascript and typescript.

21 lines (20 loc) 493 B
declare global { interface Promise<T> { /** * Reject with error in the promise chain. * * @param {any} reason * - the reason of the error * * @return {Promise<never>} * The error which throw in the promise * * @example * Promise.resolve() * .reject('a') * .catch(error => console.error(error)) */ reject(value: any): Promise<never>; } } export {};