Update for pub/sub types.

This commit is contained in:
chocolatechipui@sourcebits.com 2015-08-28 11:56:07 -07:00
parent 67605e10f6
commit c88ead53b7

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;