Files
DefinitelyTyped/PubSubjs/pubsub.d.ts
T
Paul Park 105d758fec Added PubSubjs to the list
Quick and simple definition for PubSubjs
2013-05-21 10:16:18 +01:00

25 lines
557 B
TypeScript

module PubSubJS {
interface Base extends Publish, Subscribe, Unsubscribe {
version: string;
name: string;
}
interface Publish{
publish(message: any, data: any): bool;
publish(message:any, data:any, sync:bool, immediateExceptions:Function): bool;
publishSync(message: any, data: any): bool;
}
interface Subscribe{
subscribe(message: any, func: Function): any;
}
interface Unsubscribe{
unsubscribe(tokenOrFunction: any): any;
}
}
declare var PubSub: PubSubJS.Base;