**TypeScript Version:** 2.1.5 **Code** ```ts export const bar = new Foo() export class Foo { } ``` **Expected behavior:** Either a compilation error is thrown or working code is generated **Actual behavior:** The following code is generated: ```js "use strict"; exports.bar = new Foo(); var Foo = (function () { function Foo() { } return Foo; }()); ``` It fails at runtime both in Edge and Node because `var Foo` is not yet defined.