pusher-js-mock
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -17,3 +17,3 @@ /** Interface for all the callbacks each Pusher event could potentially have */ | ||
*/ | ||
bind(name: string, callback: () => void): void; | ||
bind(name: string, callback: () => void): this; | ||
/** | ||
@@ -24,7 +24,7 @@ * Unbind callback from an event name. | ||
*/ | ||
unbind(name: string, callback: () => void): void; | ||
unbind(name: string, callback: () => void): this; | ||
/** | ||
* Unbind callbacks from all the events. | ||
*/ | ||
unbind_all(): void; | ||
unbind_all(): this; | ||
/** | ||
@@ -35,3 +35,3 @@ * Emit event with data. | ||
*/ | ||
emit(name: string, data?: any): void; | ||
emit(name: string, data?: any): this; | ||
/** | ||
@@ -38,0 +38,0 @@ * Trigger event with data. |
@@ -20,2 +20,3 @@ "use strict"; | ||
this.callbacks[name].push(callback); | ||
return this; | ||
}; | ||
@@ -29,2 +30,3 @@ /** | ||
this.callbacks[name] = (this.callbacks[name] || []).filter(function (cb) { return cb !== callback; }); | ||
return this; | ||
}; | ||
@@ -36,2 +38,3 @@ /** | ||
this.callbacks = {}; | ||
return this; | ||
}; | ||
@@ -48,2 +51,3 @@ /** | ||
} | ||
return this; | ||
}; | ||
@@ -50,0 +54,0 @@ /** |
@@ -7,3 +7,3 @@ import Members from "./members"; | ||
/** Alias to match actual API for client events */ | ||
trigger: (name: string, data?: any) => void; | ||
trigger: (name: string, data?: any) => this; | ||
IS_PROXY?: boolean; | ||
@@ -10,0 +10,0 @@ /** |
{ | ||
"name": "pusher-js-mock", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"description": "Mock Pusher.js in your JavaScript tests with ease", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42843
780