fix(ddc): type fixes necessary to bring DDC severe count to 0

This commit is contained in:
Yegor Jbanov
2016-01-21 18:13:58 -08:00
committed by Yegor
parent 9c96b8affc
commit 4282297c24
13 changed files with 82 additions and 59 deletions

View File

@ -27,7 +27,7 @@ export class KeyEventsPlugin extends EventManagerPlugin {
return isPresent(KeyEventsPlugin.parseEventName(eventName));
}
addEventListener(element: HTMLElement, eventName: string, handler: (Event: any) => any) {
addEventListener(element: HTMLElement, eventName: string, handler: Function) {
var parsedEvent = KeyEventsPlugin.parseEventName(eventName);
var outsideHandler = KeyEventsPlugin.eventCallback(
@ -90,8 +90,8 @@ export class KeyEventsPlugin extends EventManagerPlugin {
return fullKey;
}
static eventCallback(element: HTMLElement, fullKey: any, handler: (e: Event) => any,
zone: NgZone): (event: KeyboardEvent) => void {
static eventCallback(element: HTMLElement, fullKey: any, handler: Function,
zone: NgZone): Function {
return (event) => {
if (StringWrapper.equals(KeyEventsPlugin.getEventFullKey(event), fullKey)) {
zone.run(() => handler(event));