TypeScript is a superset of JavaScript which primarily provides optional static typing, classes and interfaces. One of the big benefits is to enable IDEs to provide a richer environment for spotting common errors as you type the code.

How to declare a new property on the Window object with Typescript
Learn how to declare a new property in the Window object properly to don't get any error in the compiler