Even if your application not uses TypeScript at all, you can use the type definition files for autocompletion and documentation purposes. More details here.
You can find the Overwolf API ts definition file here
If you are working with Typescript, you can install it as a npm package.
In order for TypeScript to perform the type checking, the types need to be defined somewhere. It's pretty straightforward how to add type definitions to the variables declared in your own code:
// anyObject hold values of any arbitrary type var anyObject: any; // count is a number var count: number; // regexPatterns is an array of regular expressions var regexPatterns: RegExp; // reverse is a function which accepts and returns a string var reverse: (input: string) => string;
TypeScript definition files overview
Using overwolf.d.ts file