Skip to content

Commit

Permalink
Overload cluster.on
Browse files Browse the repository at this point in the history
  • Loading branch information
AyaMorisawa committed Jan 24, 2016
1 parent 70bf7e2 commit fd8deba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions node/node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,13 @@ declare module "cluster" {

// Event emitter
export function addListener(event: string, listener: Function): void;
export function on(event: "disconnect", listener: (worker: Worker) => void): void;
export function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): void;
export function on(event: "fork", listener: (worker: Worker) => void): void;
export function on(event: "listening", listener: (worker: Worker, address: any) => void): void;
export function on(event: "message", listener: (worker: Worker, message: any) => void): void;
export function on(event: "online", listener: (worker: Worker) => void): void;
export function on(event: "setup", listener: (settings: any) => void): void;
export function on(event: string, listener: Function): any;
export function once(event: string, listener: Function): void;
export function removeListener(event: string, listener: Function): void;
Expand Down

0 comments on commit fd8deba

Please sign in to comment.