I wrote an angular2 app in Visual studio code. Recently, I updated Visual Studio Code to 1.10.2. But it has highlighted window as having an error. When I checked it, I found that it says:
[ts] Cannot find name 'window'.
My code is as follows:
saveCustomIndex(customIndex:any,indexName:string){
window.localStorage.setItem(indexName,JSON.stringify(customIndex));
}
Screenshot
How can I deal with this? Thank you!

"lib": [ "es2015", "dom" ],in your tsconfig.json