emitter 支持 context

This commit is contained in:
YHH
2020-07-12 23:41:10 +08:00
parent 14598f08c7
commit f0e04b6981
7 changed files with 51 additions and 17 deletions

View File

@@ -1044,10 +1044,15 @@ declare class DrawUtils {
declare class Emitter<T> {
private _messageTable;
constructor();
addObserver(eventType: T, handler: Function): void;
addObserver(eventType: T, handler: Function, context: any): void;
removeObserver(eventType: T, handler: Function): void;
emit(eventType: T, data?: any): void;
}
declare class FuncPack {
func: Function;
context: any;
constructor(func: Function, context: any);
}
declare class GlobalManager {
static globalManagers: GlobalManager[];
private _enabled;