Replace angle-bracket-type-assertions with "as" assertion

This commit is contained in:
Oscar Busk
2018-12-19 01:20:29 +01:00
parent 3d70da4ccd
commit 4f7d2f91d4
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -972,8 +972,8 @@ function test_trigger() {
.trigger("click", ["foo", "bar"]);
var event = jQuery.Event("logged");
(<any>event).user = "foo";
(<any>event).pass = "bar";
(event as any).user = "foo";
(event as any).pass = "bar";
$("body").trigger(event);
// Adapted from jQuery documentation which may be wrong on this occasion
@@ -1594,7 +1594,7 @@ function test_eventParams() {
$('#log').html(e.type + ': ' + e.which);
});
$(window).on('mousewheel', (e) => {
var delta = (<WheelEvent>e.originalEvent).deltaY;
var delta = (e.originalEvent as WheelEvent).deltaY;
});
$( "p" ).click(function( event ) {
alert( event.currentTarget === this ); // true
+3 -3
View File
@@ -972,8 +972,8 @@ function test_trigger() {
.trigger("click", ["foo", "bar"]);
var event = jQuery.Event("logged");
(<any>event).user = "foo";
(<any>event).pass = "bar";
(event as any).user = "foo";
(event as any).pass = "bar";
$("body").trigger(event);
// Adapted from jQuery documentation which may be wrong on this occasion
@@ -1594,7 +1594,7 @@ function test_eventParams() {
$('#log').html(e.type + ': ' + e.which);
});
$(window).on('mousewheel', (e) => {
var delta = (<WheelEvent>e.originalEvent).deltaY;
var delta = (e.originalEvent as WheelEvent).deltaY;
});
$( "p" ).click(function( event ) {
alert( event.currentTarget === this ); // true