diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-11 15:48:56 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-11 15:48:56 +0800 |
commit | de6f757ec821c6e735e0f5e8c2e5621b57c02f55 (patch) | |
tree | 349813b7270e755c7afd247e367f6952ec10ba93 /packages | |
parent | 3eeb8f4d6d5e6b301685b946719c9d6381a374eb (diff) | |
download | dexon-sol-tools-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.gz dexon-sol-tools-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.zst dexon-sol-tools-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.zip |
Introduce type JSONRpcErrorCallback
Diffstat (limited to 'packages')
-rw-r--r-- | packages/types/src/index.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 442fbb2d6..2e7e629b5 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,7 +1,9 @@ import { BigNumber } from 'bignumber.js'; +export type JSONRPCErrorCallback = (err: Error | null, result?: JSONRPCResponsePayload) => void; + export interface Provider { - sendAsync(payload: JSONRPCRequestPayload, callback: (err: Error, result: JSONRPCResponsePayload) => void): void; + sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): void; } export type ContractAbi = AbiDefinition[]; |