aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-15 03:48:46 +0800
committerFabio Berger <me@fabioberger.com>2018-05-15 03:48:46 +0800
commitd0905eda496864096f5a64b1e2c1c05b575be904 (patch)
tree86813449bbd72994f6e9ecf1a0fe6d4ddf8197d1 /packages/dev-utils
parent7c023233f201852c7f20117b2a358f47e462ae1a (diff)
downloaddexon-sol-tools-d0905eda496864096f5a64b1e2c1c05b575be904.tar
dexon-sol-tools-d0905eda496864096f5a64b1e2c1c05b575be904.tar.gz
dexon-sol-tools-d0905eda496864096f5a64b1e2c1c05b575be904.tar.bz2
dexon-sol-tools-d0905eda496864096f5a64b1e2c1c05b575be904.tar.lz
dexon-sol-tools-d0905eda496864096f5a64b1e2c1c05b575be904.tar.xz
dexon-sol-tools-d0905eda496864096f5a64b1e2c1c05b575be904.tar.zst
dexon-sol-tools-d0905eda496864096f5a64b1e2c1c05b575be904.zip
Fix TSLint issues
Diffstat (limited to 'packages/dev-utils')
-rw-r--r--packages/dev-utils/src/callback_error_reporter.ts15
1 files changed, 12 insertions, 3 deletions
diff --git a/packages/dev-utils/src/callback_error_reporter.ts b/packages/dev-utils/src/callback_error_reporter.ts
index c8e693673..8432bb5d4 100644
--- a/packages/dev-utils/src/callback_error_reporter.ts
+++ b/packages/dev-utils/src/callback_error_reporter.ts
@@ -6,7 +6,10 @@ import { DoneCallback } from '@0xproject/types';
const expect = chai.expect;
export const callbackErrorReporter = {
- reportNoErrorCallbackErrors(done: DoneCallback, expectToBeCalledOnce = true) {
+ reportNoErrorCallbackErrors(
+ done: DoneCallback,
+ expectToBeCalledOnce: boolean = true,
+ ): <T>(f?: ((value: T) => void) | undefined) => (value: T) => void {
const callback = <T>(f?: (value: T) => void) => {
const wrapped = (value: T) => {
if (_.isUndefined(f)) {
@@ -26,7 +29,10 @@ export const callbackErrorReporter = {
};
return callback;
},
- reportNodeCallbackErrors(done: DoneCallback, expectToBeCalledOnce = true) {
+ reportNodeCallbackErrors(
+ done: DoneCallback,
+ expectToBeCalledOnce: boolean = true,
+ ): <T>(f?: ((value: T) => void) | undefined) => (error: Error | null, value: T | undefined) => void {
const callback = <T>(f?: (value: T) => void) => {
const wrapped = (error: Error | null, value: T | undefined) => {
if (!_.isNull(error)) {
@@ -50,7 +56,10 @@ export const callbackErrorReporter = {
};
return callback;
},
- assertNodeCallbackError(done: DoneCallback, errMsg: string) {
+ assertNodeCallbackError(
+ done: DoneCallback,
+ errMsg: string,
+ ): <T>(error: Error | null, value: T | undefined) => void {
const wrapped = <T>(error: Error | null, value: T | undefined) => {
if (_.isNull(error)) {
done(new Error('Expected callback to receive an error'));