diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-10 20:51:09 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-11 20:22:04 +0800 |
commit | 292c3bbff81f6e1364109981123a35b1cb32f693 (patch) | |
tree | b609eb040272a049d0b2980bb9b103288d6f512b /packages/0x.js/src/types.ts | |
parent | 065570ebf57eb37b14ffd0b2fe131c3dcec4064a (diff) | |
download | dexon-0x-contracts-292c3bbff81f6e1364109981123a35b1cb32f693.tar dexon-0x-contracts-292c3bbff81f6e1364109981123a35b1cb32f693.tar.gz dexon-0x-contracts-292c3bbff81f6e1364109981123a35b1cb32f693.tar.bz2 dexon-0x-contracts-292c3bbff81f6e1364109981123a35b1cb32f693.tar.lz dexon-0x-contracts-292c3bbff81f6e1364109981123a35b1cb32f693.tar.xz dexon-0x-contracts-292c3bbff81f6e1364109981123a35b1cb32f693.tar.zst dexon-0x-contracts-292c3bbff81f6e1364109981123a35b1cb32f693.zip |
Make some callbacks failable and add error handling
Diffstat (limited to 'packages/0x.js/src/types.ts')
-rw-r--r-- | packages/0x.js/src/types.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/0x.js/src/types.ts b/packages/0x.js/src/types.ts index 44f8aa223..2decd92ba 100644 --- a/packages/0x.js/src/types.ts +++ b/packages/0x.js/src/types.ts @@ -51,7 +51,7 @@ export interface DecodedLogEvent<ArgsType> { } export type EventCallback<ArgsType> = (err: null | Error, log?: DecodedLogEvent<ArgsType>) => void; -export type EventWatcherCallback = (log: LogEvent) => void; +export type EventWatcherCallback = (err: null | Error, log?: LogEvent) => void; export enum SolidityTypes { Address = 'address', @@ -406,5 +406,5 @@ export interface OrderStateInvalid { export type OrderState = OrderStateValid | OrderStateInvalid; -export type OnOrderStateChangeCallback = (orderState: OrderState) => void; +export type OnOrderStateChangeCallback = (err: Error | null, orderState?: OrderState) => void; // tslint:disable:max-file-line-count |