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

View File

@ -23,12 +23,6 @@ class Client extends EventEmitter {
this.on('error', console.log)
}
// The logging is exposed via events, which the user can
// listen to and log the message its preferred way
// we add a fake listener to the error event to avoid
// the "unhandled error event" error.
this.on('error', () => {})
const options = Object.assign({}, {
Connection,
ConnectionPool,
@ -95,7 +89,6 @@ class Client extends EventEmitter {
const events = {
RESPONSE: 'response',
REQUEST: 'request',
ERROR: 'error',
SNIFF: 'sniff'
}