Call a global variable inside module

typescript

Solution

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`.

Problem

I have a typescript file called `Projects.ts` that I want to reference a global variable declared in a bootstrap plugin called `bootbox.js`. I want to access a variable called `bootbox` from within a TypeScript classes. Is it possible?

Original source

Related problems