WIP: initial prototype

- Added error parameter to request and response event
- Dropped error event
- Updated typescript indentation
This commit is contained in:
delvedor
2018-12-05 22:16:16 +01:00
parent 7e35f6a903
commit aa5977b153
8 changed files with 202 additions and 204 deletions

9
index.d.ts vendored
View File

@ -8,7 +8,7 @@ import ConnectionPool, { nodeSelectorFn, nodeFilterFn } from './lib/ConnectionPo
import Serializer from './lib/Serializer';
declare type anyObject = {
[key: string]: any;
[key: string]: any;
};
declare type callbackFn = (err: Error | null, result: ApiResponse) => void;
declare type apiMethod = (params?: anyObject | callbackFn, callback?: callbackFn) => any;
@ -464,10 +464,9 @@ declare class Client extends EventEmitter {
}
declare const events: {
RESPONSE: string;
REQUEST: string;
ERROR: string;
SNIFF: string;
RESPONSE: string;
REQUEST: string;
SNIFF: string;
};
export {