提交 14bc1172 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

clean

上级 2326f8ad
......@@ -622,13 +622,13 @@ export class Wechaty extends EventEmitter implements Sayable {
})
break
case 'watchdog':
puppet.on('watchdog', data => {
case 'heartbeat':
puppet.on('heartbeat', payload => {
/**
* Use `watchdog` event from Puppet to `heartbeat` Wechaty.
*/
// TODO: use a throttle queue to prevent beat too fast.
this.emit('heartbeat', data)
this.emit('heartbeat', payload.data)
})
break
......@@ -756,6 +756,9 @@ export class Wechaty extends EventEmitter implements Sayable {
break
default:
/**
* Check: The eventName here should have the type `never`
*/
throw new Error('eventName ' + eventName + ' unsupported!')
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册