1- import { Optional , EndsWith } from '../../utils/typescript-utils' ;
1+ import { Optional } from '../../utils/typescript-utils' ;
22
33/**
44 * Base event data.
@@ -160,7 +160,7 @@ export class Observable {
160160 * `this` context when the callback is called. Falsy values will be not be
161161 * bound.
162162 */
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 {
164164 this . addEventListener ( eventName , callback , thisArg ) ;
165165 }
166166
@@ -175,7 +175,7 @@ export class Observable {
175175 * `this` context when the callback is called. Falsy values will be not be
176176 * bound.
177177 */
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 {
179179 this . addEventListener ( eventName , callback , thisArg , true ) ;
180180 }
181181
@@ -188,7 +188,7 @@ export class Observable {
188188 * @param thisArg An optional parameter which, when set, will be used to
189189 * refine search of the correct event listener to be removed.
190190 */
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 {
192192 this . removeEventListener ( eventName , callback , thisArg ) ;
193193 }
194194
0 commit comments