chore: removed this for now. Not really needed as using plugin

This commit is contained in:
Martin Guillon
2020-10-08 09:53:00 +02:00
parent 60060d984d
commit 893431a66d
2 changed files with 0 additions and 16 deletions

View File

@ -164,17 +164,6 @@ export class Observable {
public _isViewBase: boolean;
//@endprivate
/**
* This method is intended to be overriden by inheritors to be notified when a new listener is added
* count is the number of listeners for that event after addition
*/
onListenerAdded(eventName: string, count: number);
/**
* This method is intended to be overriden by inheritors to be notified when a new listener is removed
* count is the number of listeners for that event after removal
*/
onListenerRemoved(eventName: string, count: number);
}

View File

@ -95,8 +95,6 @@ export class Observable implements ObservableDefinition {
public off(eventNames: string, callback?: any, thisArg?: any): void {
this.removeEventListener(eventNames, callback, thisArg);
}
onListenerAdded(eventName: string, count: number) {}
onListenerRemoved(eventName: string, count: number) {}
public addEventListener(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void {
if (typeof eventNames !== 'string') {
@ -116,7 +114,6 @@ export class Observable implements ObservableDefinition {
callback: callback,
thisArg: thisArg,
});
this.onListenerAdded(event, list.length );
}
}
@ -143,11 +140,9 @@ export class Observable implements ObservableDefinition {
delete this._observers[event];
}
}
this.onListenerRemoved(event, list ? list.length : 0);
} else {
this._observers[event] = undefined;
delete this._observers[event];
this.onListenerRemoved(event, 0);
}
}
}