1 2 3 4 5 6 7 8 9 10 11 12 13
import { logUtils } from '@0xproject/utils'; export function consoleReporter<T>(asyncFn: (arg: T) => Promise<void>) { const noThrowFnAsync = async (arg: T) => { try { const result = await asyncFn(arg); return result; } catch (err) { logUtils.log(`${err}`); } }; return noThrowFnAsync; }