You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
703 B

// Type definitions for component-emitter v1.2.1
// Project:
// Definitions by: Peter Snider <>
// Definitions:
// TypeScript Version: 2.2
interface Emitter<Event = string> {
on(event: Event, listener: Function): Emitter;
once(event: Event, listener: Function): Emitter;
off(event?: Event, listener?: Function): Emitter;
emit(event: Event, ...args: any[]): Emitter;
listeners(event: Event): Function[];
hasListeners(event: Event): boolean;
declare const Emitter: {
(obj?: object): Emitter;
new (obj?: object): Emitter;
export = Emitter;