I am working with Angular and Meteor using Typescript. When I set up a collection I normally declare a global variable (that's the why meteor does it):
Invoices = new Mongo.Collection( 'invoices' );
Now I want to add the Invoices to my typescript custom definition so that code's intellisense doesn't trip over it.
However, Invoices is part of window object and I can't duplicate a module declaration.
Just adding this to my custom.d.ts file works for intellisense in my code
var Invoices: Mongo.Collection<any>;
However code doesn't like the var. It says I need to use declare module.
However, I can't redeclare module Window.
So I am a bit at a loss how to do it in a correct way.
declare var Invoices: Mongo.Collection<any>;seems to work. Is that the best way?