aboutsummaryrefslogtreecommitdiffstats
path: root/packages/types/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-11 15:48:56 +0800
committerFabio Berger <me@fabioberger.com>2018-04-11 15:48:56 +0800
commitde6f757ec821c6e735e0f5e8c2e5621b57c02f55 (patch)
tree349813b7270e755c7afd247e367f6952ec10ba93 /packages/types/src
parent3eeb8f4d6d5e6b301685b946719c9d6381a374eb (diff)
downloaddexon-0x-contracts-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar
dexon-0x-contracts-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.gz
dexon-0x-contracts-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.bz2
dexon-0x-contracts-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.lz
dexon-0x-contracts-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.xz
dexon-0x-contracts-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.zst
dexon-0x-contracts-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.zip
Introduce type JSONRpcErrorCallback
Diffstat (limited to 'packages/types/src')
-rw-r--r--packages/types/src/index.ts4
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[];