mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Merge pull request #3905 from cseufert/master
Intercom.JS - Added off method
This commit is contained in:
@@ -17,4 +17,6 @@ function test_intercom_static() {
|
||||
console.log(onceListenerInvokedTimes === 1);
|
||||
|
||||
instance.emit("eventWithoutAMessage");
|
||||
|
||||
instance.off("test", detect);
|
||||
}
|
||||
|
||||
6
intercomjs/intercom.d.ts
vendored
6
intercomjs/intercom.d.ts
vendored
@@ -17,6 +17,12 @@ declare module intercom {
|
||||
* @param fn The listener method to invoke.
|
||||
*/
|
||||
on(name: string, fn: Function): void;
|
||||
/**
|
||||
* Remove a registered event listener
|
||||
* @param name The string event listener name.
|
||||
* @param fn The listener method to remove.
|
||||
*/
|
||||
off(name: string, fn: Function): void;
|
||||
/**
|
||||
* Given a unique key to represent the function, fn will be invoked in only one window. The ttl argument represents the number of seconds before the function can be called again.
|
||||
* @param key The unique function identifier key
|
||||
|
||||
Reference in New Issue
Block a user