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(
You also have this option:
window.addEventListener('OnRewards', (e: CustomEvent) => { // your code here } as (e: Event) => void)