UNPKG

986 BTypeScriptView Raw
1import { Observable, EventData } from '../../../data/observable';
2
3/**
4 * Attaches a WeakEventListener.
5 * @param source Observable class which emits the event.
6 * @param eventName The event name.
7 * @param handler The function which should be called when event occurs.
8 * @param target Subscriber (target) of the event listener. It will be used as a thisArg in the handler function.
9 */
10export function addWeakEventListener(source: Observable, eventName: string, handler: (eventData: EventData) => void, target: any): void;
11
12/**
13 * Removes a WeakEventListener.
14 * @param source Observable class which emits the event.
15 * @param eventName The event name.
16 * @param handler The function which should be called when event occurs.
17 * @param target Subscriber (target) of the event listener. It will be used as a thisArg in the handler function.
18 */
19export function removeWeakEventListener(source: Observable, eventName: string, handler: (eventData: EventData) => void, target: any): void;