I used stackoverflow How do you explicitly set a new property on `window` in TypeScript? to extend window. The code looks like the following:
interface Window { appConfig: any; }
window.appConfig = window.appConfig || {};
Everything works fine.
When i add the line
import _ = require('lodash');
I get an error
Error TS2339: Property 'appConfig' does not exist on type 'Window'.
How can i fix this issue?
I work with typescript 1.6.2
(<any>window).appConfig = (<any>window).appConfig || {};Here is a possible duplicate stackoverflow.com/questions/12709074/…