UNPKG

missing-native-js-functions

Version:

mnJSf that should be the base library for every JS project

14 lines (13 loc) 451 B
declare global { interface Promise<T> { /** * Catches all errors in the console without the need to specify a function, similar to `promise.catch(console.error)` * @example * new Promise((res, rej) => { * rej("Promised rejected, but caught in console.error"); *}).caught(); // will not throw the promise, but log the error in the console */ caught?(): this; } } export {};