Guest User

Untitled

a guest
Dec 12th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. export class Foo {
  2. prop1: number = 1;
  3. }
  4.  
  5. import { Foo as FooClass } from "./Foo";
  6.  
  7. export namespace main {
  8. export const Foo = FooClass;
  9. }
  10.  
  11. define("Foo", ["require", "exports"], function (require, exports) {
  12. "use strict";
  13. Object.defineProperty(exports, "__esModule", { value: true });
  14. var Foo = /** @class */ (function () {
  15. function Foo() {
  16. this.prop1 = 1;
  17. }
  18. return Foo;
  19. }());
  20. exports.Foo = Foo;
  21. });
  22. define("foo2", ["require", "exports", "Foo"], function (require, exports, Foo_1) {
  23. "use strict";
  24. Object.defineProperty(exports, "__esModule", { value: true });
  25. var main;
  26. (function (main) {
  27. main.Foo = Foo_1.Foo; //ERROR: Cannot read property 'Foo' of undefined
  28. })(main = exports.main || (exports.main = {}));
  29. });
  30.  
  31. import {main} from '../node_modules/main'
Add Comment
Please, Sign In to add comment