From 80291930f040f4ed0cfbf5eebf885c374ff7905f Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 26 Jul 2017 15:15:57 +0200 Subject: Make error types consistent --- packages/web3-typescript-typings/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/web3-typescript-typings/index.d.ts b/packages/web3-typescript-typings/index.d.ts index 4bd6bf371..0b17a50c6 100644 --- a/packages/web3-typescript-typings/index.d.ts +++ b/packages/web3-typescript-typings/index.d.ts @@ -90,7 +90,7 @@ declare module 'web3' { interface FilterResult { get(callback: () => void): void; - watch(callback: (error: string|null, result: SolidityEvent) => void): void; + watch(callback: (err: Error, result: SolidityEvent) => void): void; stopWatching(callback: () => void): void; } @@ -118,7 +118,7 @@ declare module 'web3' { getSyncing(cd: (err: Error, syncing: Web3.SyncingResult) => void): void; isSyncing(cb: (err: Error, isSyncing: boolean, syncingState: Web3.SyncingState) => void): Web3.IsSyncing; compile: { - solidity(sourceString: string, cb?: (err: any, result: any) => void): object, + solidity(sourceString: string, cb?: (err: Error, result: any) => void): object, } getBlock(hashStringOrBlockNumber: string|Web3.BlockParam): Web3.BlockWithoutTransactionData; @@ -151,15 +151,15 @@ declare module 'web3' { // TODO block param getBalance(addressHexString: string): BigNumber.BigNumber; - getBalance(addressHexString: string, callback: (err: any, result: BigNumber.BigNumber) => void): void; + getBalance(addressHexString: string, callback: (err: Error, result: BigNumber.BigNumber) => void): void; // TODO block param getStorageAt(address: string, position: number): string; - getStorageAt(address: string, position: number, callback: (err: any, storage: string) => void): void; + getStorageAt(address: string, position: number, callback: (err: Error, storage: string) => void): void; // TODO block param getCode(addressHexString: string): string; - getCode(addressHexString: string, callback: (err: any, code: string) => void): void; + getCode(addressHexString: string, callback: (err: Error, code: string) => void): void; filter(value: string|Web3.FilterObject): Web3.FilterResult; -- cgit