Description
TypeScript Version: playground nightly (2020-06-12)
Search Terms: window event inference any
Code
window.onbeforeunload = event => event;
Expected behavior: event
has type BeforeUnloadEvent
Actual behavior: event
has type any
(resulting in an erro)
Playground Link: https://www.typescriptlang.org/play/?ts=4.0.0-dev.20200611#code/O4SwdgJg9sB0VgEYFMBmUBOyCuYA2UAhhAAQC8JyAbsmAC7kB8lN9A3EA
Related Issues: