I have a typescript file called Projects.ts that I want to reference a global variable declared in a bootstrap plugin called bootbox.js.
Projects.ts
bootbox.js
I want to access a variable called bootbox from within a TypeScript classes.
bootbox
Is it possible?
You need to tell the compiler it has been declared:
declare var bootbox: any;
If you have better type information you can add that too, in place of any.
any
1.4m articles
1.4m replys
5 comments
57.0k users