1
- import { Optional , EndsWith } from '../../utils/typescript-utils' ;
1
+ import { Optional } from '../../utils/typescript-utils' ;
2
2
3
3
/**
4
4
* Base event data.
@@ -160,7 +160,7 @@ export class Observable {
160
160
* `this` context when the callback is called. Falsy values will be not be
161
161
* bound.
162
162
*/
163
- public on < S extends string > ( eventName : S , callback : ( data : EndsWith < S , 'Change' , PropertyChangeData , EventData > ) => void , thisArg ?: any ) : void {
163
+ public on ( eventName : string , callback : ( data : EventData ) => void , thisArg ?: any ) : void {
164
164
this . addEventListener ( eventName , callback , thisArg ) ;
165
165
}
166
166
@@ -175,7 +175,7 @@ export class Observable {
175
175
* `this` context when the callback is called. Falsy values will be not be
176
176
* bound.
177
177
*/
178
- public once < S extends string > ( eventName : S , callback : ( data : EndsWith < S , 'Change' , PropertyChangeData , EventData > ) => void , thisArg ?: any ) : void {
178
+ public once ( eventName : string , callback : ( data : EventData ) => void , thisArg ?: any ) : void {
179
179
this . addEventListener ( eventName , callback , thisArg , true ) ;
180
180
}
181
181
@@ -188,7 +188,7 @@ export class Observable {
188
188
* @param thisArg An optional parameter which, when set, will be used to
189
189
* refine search of the correct event listener to be removed.
190
190
*/
191
- public off < S extends string > ( eventName : S , callback ?: ( data : EndsWith < S , 'Change' , PropertyChangeData , EventData > ) => void , thisArg ?: any ) : void {
191
+ public off ( eventName : string , callback ?: ( data : EventData ) => void , thisArg ?: any ) : void {
192
192
this . removeEventListener ( eventName , callback , thisArg ) ;
193
193
}
194
194
0 commit comments