You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The this value of r is actually el or typeof el, but typescript tells me that r is "GlobalEventHandlers". This is very annoying because even if I try to replace it with:
TypeScript still incorrectly throws an error saying that the "this" types are incompatible...
If TS cannot correctly assume/infer the this type, it should at least default to the "any" type or something so that I can specify my own this type without getting errors. I'm not sure if this happens with all events or just those that are "GlobalEventHandlers" related, but I did notice that in the following variations of my example, the this types are more or less correctly assumed/inferred:
ontransitionend=function(){letr=this}// r's type is "Window"window.ontransitionend=function(){letr=this}// r's type is "Window & typeof globalThis"
The text was updated successfully, but these errors were encountered:
In:
The this value of r is actually el or typeof el, but typescript tells me that r is "GlobalEventHandlers". This is very annoying because even if I try to replace it with:
TypeScript still incorrectly throws an error saying that the "this" types are incompatible...
If TS cannot correctly assume/infer the this type, it should at least default to the "any" type or something so that I can specify my own this type without getting errors. I'm not sure if this happens with all events or just those that are "GlobalEventHandlers" related, but I did notice that in the following variations of my example, the this types are more or less correctly assumed/inferred:
The text was updated successfully, but these errors were encountered: