From de6f757ec821c6e735e0f5e8c2e5621b57c02f55 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 11 Apr 2018 16:48:56 +0900 Subject: Introduce type JSONRpcErrorCallback --- packages/types/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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[]; -- cgit