Merge pull request #5595 from chocolatechipui/master

Update for pub/sub types.
This commit is contained in:
Masahiro Wakame
2015-09-03 01:51:36 +09:00

View File

@@ -1,4 +1,4 @@
// Type definitions for chocolatechip v4.0.3
// Type definitions for chocolatechip v4.0.4
// Project: https://github.com/chocolatechipui/ChocolateChipJS
// Definitions by: Robert Biggs <http://chocolatechip-ui.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -456,7 +456,7 @@ interface ChocolateChipStatic {
* @data any You can receive any type: string, number, array, object, etc.
* @return any
*/
subscribe(topic: string, callback: (topic: string, data: any) => boolean): boolean;
subscribe(topic: string, callback: (topic: string, data: any) => any): boolean;
/**
* Unsubscribe from a topic. Pass this the topic you wish to unsubscribe from. The subscription will be terminated immediately.
@@ -1480,3 +1480,5 @@ interface Window {
}
declare var $: ChocolateChipStatic;
declare var fetch: fetch;
declare var chocolatechipjs: ChocolateChipStatic;