connect.d.ts
47 lines
| 1.7 KiB
| video/mp2t
|
TypeScriptLexer
cin
|
r2 | import { Handle } from "../interfaces"; | ||
cin
|
r15 | /** | ||
* TODO: Type this better | ||||
*/ | ||||
export function _keypress(object: any, listener: EventListener): Handle; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* `dojo.connect` is a deprecated event handling and delegation method in | ||||
* Dojo. It allows one function to "listen in" on the execution of | ||||
* any other, triggering the second whenever the first is called. Many | ||||
* listeners may be attached to a function, and source functions may | ||||
* be either regular function calls or DOM events. | ||||
*/ | ||||
export function connect(obj: any, event: string, context: any, method: EventListener | string, dontFix?: boolean): Handle; | ||||
export function connect(event: string, context: any, method: EventListener | string, dontFix?: boolean): Handle; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* Remove a link created by dojo.connect. | ||||
*/ | ||||
export function disconnect(handle: Handle): void; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* Attach a listener to a named topic. The listener function is invoked whenever the | ||||
* named topic is published (see: dojo.publish). | ||||
* Returns a handle which is needed to unsubscribe this listener. | ||||
*/ | ||||
export function subscribe(topic: string, context: any, method: EventListener): Handle; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* Invoke all listener method subscribed to topic. | ||||
*/ | ||||
export function publish(topic: string, args: any[]): boolean; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* Ensure that every time obj.event() is called, a message is published | ||||
* on the topic. Returns a handle which can be passed to | ||||
* dojo.disconnect() to disable subsequent automatic publication on | ||||
* the topic. | ||||
*/ | ||||
export function connectPublisher(topic: string, obj: any, method: string): Handle; | ||||
export function connectPublisher(topic: string, method: EventListener): Handle; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* Checks an event for the copy key (meta on Mac, and ctrl anywhere else) | ||||
*/ | ||||
export function isCopyKey(e: Event): boolean; | ||||