Collection ReferenceError ... not defined

I have an Angular 2 project and cannot get my reference to a collection.
Below are my 2 files in question.
The new Mongo IS called.

But Companies is not defined when I get to that line in Accounts.onCreateUser().

Error: Companies: ReferenceError: Companies is not defined???

/File: collections/Company.ts/
import {Mongo} from ‘meteor/mongo’;
export let Companies = new Mongo.Collection(‘company’);

/** File: server/addnewuser.ts **/
import {Companies} from ‘…/collections/Company’;

Accounts.onCreateUser((options, user) => {
if (! {
throw new Error(‘Expected login with Twitter only.’);
user._id =;

// Use the default hook's 'profile' behavior => user_profile
if (options.profile) {
    user.user_profile = options.profile;
    user.user_profile.imageurl =;
    user.roles = ["user", "admin"];

 // Create a company
let my_account:Account = <Account>{id: user._id};
my_account.handle = user.user_profile.handle;
my_account.type = "twitter";

let client:Client = <Client>{name: "_self"};
client.createdAt = new Date();
client.accounts = [my_account];
client.tags = ["TOFU", "MOFU", "BOFU"];

let company:Company = <Company>{name: "_self"};
//company._id =;
company.createdAt = new Date();
company.user_ids = [user._id];
company.clients = [client];

return user;



Changed the “export let Companies…”


“export var Companies…”

Worked … scoping issue.