Skip to content

Commit

Permalink
feat(typings): define Messenger['on'] and Messenger['once'] (#2763)
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingsong authored and popomore committed Jul 7, 2018
1 parent aaf8faf commit 2ca8f01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.d.ts
@@ -1,6 +1,7 @@
import * as accepts from 'accepts';
import * as KoaApplication from 'koa';
import * as KoaRouter from 'koa-router';
import { EventEmitter } from 'events'
import { RequestOptions } from 'urllib';
import { Readable } from 'stream';
import { Socket } from 'net';
Expand Down Expand Up @@ -1035,7 +1036,7 @@ declare module 'egg' {
};

// send data can be number|string|boolean|object but not Set|Map
export interface Messenger {
export interface Messenger extends EventEmitter {
/**
* broadcast to all agent/app processes including itself
*/
Expand Down

0 comments on commit 2ca8f01

Please sign in to comment.