From b74957acdfc8d67d154bcb4698acd7575db7cc47 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 11 May 2018 17:38:51 +0200 Subject: Add missing type definitions --- packages/contract-wrappers/src/utils/assert.ts | 2 +- packages/contract-wrappers/src/utils/decorators.ts | 4 ++-- packages/contract-wrappers/src/utils/order_validation_utils.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts index 2588a4d09..c74ed341f 100644 --- a/packages/contract-wrappers/src/utils/assert.ts +++ b/packages/contract-wrappers/src/utils/assert.ts @@ -12,7 +12,7 @@ import { isValidSignature } from '@0xproject/order-utils'; export const assert = { ...sharedAssert, - isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string) { + isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string): void { const isValid = isValidSignature(orderHash, ecSignature, signerAddress); this.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`); }, diff --git a/packages/contract-wrappers/src/utils/decorators.ts b/packages/contract-wrappers/src/utils/decorators.ts index 64123143c..494575e7b 100644 --- a/packages/contract-wrappers/src/utils/decorators.ts +++ b/packages/contract-wrappers/src/utils/decorators.ts @@ -39,7 +39,7 @@ const asyncErrorHandlerFactory = (errorTransformer: ErrorTransformer) => { // Do not use arrow syntax here. Use a function expression in // order to use the correct value of `this` in this method // tslint:disable-next-line:only-arrow-functions - descriptor.value = async function(...args: any[]) { + descriptor.value = async function(...args: any[]): Promise { try { const result = await originalMethod.apply(this, args); return result; @@ -66,7 +66,7 @@ const syncErrorHandlerFactory = (errorTransformer: ErrorTransformer) => { // Do not use arrow syntax here. Use a function expression in // order to use the correct value of `this` in this method // tslint:disable-next-line:only-arrow-functions - descriptor.value = function(...args: any[]) { + descriptor.value = function(...args: any[]): any { try { const result = originalMethod.apply(this, args); return result; diff --git a/packages/contract-wrappers/src/utils/order_validation_utils.ts b/packages/contract-wrappers/src/utils/order_validation_utils.ts index 36dfbd800..362c605de 100644 --- a/packages/contract-wrappers/src/utils/order_validation_utils.ts +++ b/packages/contract-wrappers/src/utils/order_validation_utils.ts @@ -86,12 +86,12 @@ export class OrderValidationUtils { private static _validateRemainingFillAmountNotZeroOrThrow( takerTokenAmount: BigNumber, unavailableTakerTokenAmount: BigNumber, - ) { + ): void { if (takerTokenAmount.eq(unavailableTakerTokenAmount)) { throw new Error(ExchangeContractErrs.OrderRemainingFillAmountZero); } } - private static _validateOrderNotExpiredOrThrow(expirationUnixTimestampSec: BigNumber) { + private static _validateOrderNotExpiredOrThrow(expirationUnixTimestampSec: BigNumber): void { const currentUnixTimestampSec = utils.getCurrentUnixTimestampSec(); if (expirationUnixTimestampSec.lessThan(currentUnixTimestampSec)) { throw new Error(ExchangeContractErrs.OrderFillExpired); -- cgit v1.2.3