7 lines
119 B
TypeScript
7 lines
119 B
TypeScript
|
export function safeRun(fn: () => Promise<void>) {
|
||
|
fn().catch((e) => {
|
||
|
// console.error(e);
|
||
|
throw e;
|
||
|
});
|
||
|
}
|