BaseJQueryEventObject, JQueryEventObject, etc are deprecated. What do we replace it with?

Viewed 1018

When you migrate from jQuery v2 to jQuery v3, interfaces like BaseJQueryEventObject on types definitions are deprecated.

What is the replacement on code?

For example, with angularjs, we have functions like this:

public keyDown($event: JQueryEventObject) {
    alert ($event.keyCode);
}

And we receive a message like this:

ERROR: 18:28  deprecation  JQueryEventObject is deprecated.

Here is the new type definition: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/7a9ecd61d02e715adf369b191571007bd1a7c572/types/jquery/index.d.ts#L7546

2 Answers
Related