I am using Typescript 0.9.1.1 and I seem to be getting an error with this simple problem:
function doSomething(): void {
console.log("Printing something");
}
window.setTimeout(() => {
doSomething();
}, 3000);
It says that I have an Unresolved Function or Method setTimeOut(). I looked into the Typescript lib.d.ts file, and this is what I found:
declare function setTimeout(expression: any, msec?: number, language?: any): number;
From this piece of documentation on MDN, I can also say that I am calling it right. So, why is TypeScript giving me issues?
This is what my lib.d.ts file looks like:
