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
755k questions
754k answers
5 comments
53.3k users