fix(providers):fix types of mitt and build script

datastructure-update
neeboo 5 years ago
parent 72bbbed9b6
commit 1e63f5a465
  1. 3
      .travis.yml
  2. 1
      package.json
  3. 2
      packages/harmony-network/package.json
  4. 2
      packages/harmony-network/src/providers/baseSocket.ts
  5. 2
      packages/harmony-network/src/providers/emitter.ts

@ -7,9 +7,8 @@ branches:
except:
- /^v[0-9]/
install:
- yarn install
script:
- yarn bootstrap
script:
- yarn test:src
- yarn dist
- yarn docs:gitbook # generate docs to ghpage

@ -101,7 +101,6 @@
"jest-watch-typeahead": "^0.2.0",
"jsdoc": "^3.6.3",
"lerna": "^3.2.1",
"mitt": "^1.1.3",
"mkdirp": "^0.5.1",
"prettier": "^1.18.2",
"prettier-plugin-solidity": "^1.0.0-alpha.22",

@ -20,7 +20,7 @@
"dependencies": {
"@harmony-js/utils": "0.1.28",
"cross-fetch": "^3.0.2",
"mitt": "^1.1.3",
"mitt": "1.2.0",
"websocket": "^1.0.28"
},
"gitHead": "775e2ba36924fcffd8d2c0b73587b549ed90bb81"

@ -34,7 +34,7 @@ class BaseSocket extends BaseProvider {
throw new Error(`${url} is not websocket`);
}
this.url = url;
this.emitter = new mitt(this.handlers);
this.emitter = mitt(this.handlers);
}
resetHandlers() {
// tslint:disable-next-line: forin

@ -10,7 +10,7 @@ class Emitter {
reject?: any;
then?: any;
constructor() {
this.emitter = new mitt(this.handlers);
this.emitter = mitt(this.handlers);
this.off = this.emitter.off.bind(this);
this.emit = this.emitter.emit.bind(this);
// tslint:disable-next-line: no-empty

Loading…
Cancel
Save