I have this custom event setup, and it works with TypeScript 2.5.3, but when I updated to 2.6.1 I get an error
2.5.3
2.6.1
window.addEventListener(
Building off of jcalz's excellent answer, you can also use a type assertion to be a little cleaner:
window.addEventListener('OnRewards', (e: Event) => { const detail = (e).detail; ... });