- Learning about typescript is new to me.
I have a functional prototype in fiddle, where there are no errors if I use this code. http://jsfiddle.net/61ufvtpj/2/
But in typescript, when I utilize this line - if(this.checked){ it presents an error [ts] Property 'checked' does not exist on type 'TElement'.
- Could you guide me on how to resolve this so that I can handle it myself in the future?
- I am including relevant code below and the complete code in the gist provided here:
https://gist.github.com/niniyzni/4faea080e53eb0c7155ddd8fb635a46c
$(document).on('change', '#playerFlagCheck', function () {
if(this.checked){ //[ts] Property 'checked' does not exist on type 'TElement'.
$('#editIconplayer').addClass("gridUpdateIcon");
alert("I am inside if");
}else{
alert("I am inside else");
if(!$('#editIconplayer').hasClass("gridUpdateIcon")){
$('#editIconplayer').removeClass("gridUpdateIcon");
}
}
});