From 111f7e917ed3cb16de9930e093ea7dbcb9451d19 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 21 Mar 2018 15:24:41 +0100 Subject: Add function docs --- packages/deployer/src/utils/error_reporter.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'packages/deployer') diff --git a/packages/deployer/src/utils/error_reporter.ts b/packages/deployer/src/utils/error_reporter.ts index bf3f96a7c..4e73307f0 100644 --- a/packages/deployer/src/utils/error_reporter.ts +++ b/packages/deployer/src/utils/error_reporter.ts @@ -1,7 +1,11 @@ import { logUtils } from '@0xproject/utils'; -// Makes an async function no-throw printing errors to the console -export function consoleReporter(asyncFn: (arg: T) => Promise) { +/** + * Makes an async function no-throw printing errors to the console + * @param asyncFn async function to wrap + * @return Wrapped version of the passed function + */ +export function consoleReporter(asyncFn: (arg: T) => Promise): (arg: T) => Promise { const noThrowFnAsync = async (arg: T) => { try { const result = await asyncFn(arg); -- cgit