fix(compiler): correctly type event handler proxy functions
This commit is contained in:

committed by
Martin Probst

parent
7192fec841
commit
aa9b617c9d
@ -351,7 +351,7 @@ export abstract class AppView<T> {
|
||||
}
|
||||
}
|
||||
|
||||
eventHandler(cb: Function): Function { return cb; }
|
||||
eventHandler<E, R>(cb: (event?: E) => R): (event?: E) => R { return cb; }
|
||||
|
||||
throwDestroyedError(details: string): void { throw new ViewDestroyedError(details); }
|
||||
}
|
||||
@ -434,9 +434,9 @@ export class DebugAppView<T> extends AppView<T> {
|
||||
}
|
||||
}
|
||||
|
||||
eventHandler(cb: Function): Function {
|
||||
eventHandler<E, R>(cb: (event?: E) => R): (event?: E) => R {
|
||||
var superHandler = super.eventHandler(cb);
|
||||
return (event: any) => {
|
||||
return (event?: any) => {
|
||||
this._resetDebug();
|
||||
try {
|
||||
return superHandler(event);
|
||||
|
Reference in New Issue
Block a user