How do you find the type of event in Typescript?

Viewed 44518

Here is my HTML template:

<input (keyup)="onKey($event)">

Here is my TypeScript file:

onKey(event: any) {
    console.log(typeof event);
}

The console.log outputs object but in reality it should be KeyboardEvent.

Is there a generic way to find the type of event?

1 Answers
Related