cosmos-multisig-ui/lib/promises.ts
2023-12-12 15:22:13 +01:00

8 lines
270 B
TypeScript

/*
Prevents unhandled promise rejections from being thrown.
Follows https://jakearchibald.com/2023/unhandled-rejections
*/
export function preventUnhandledRejections(...promises: Promise<unknown>[]) {
for (const promise of promises) promise.catch(() => {});
}