1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
//// [tests/cases/conformance/externalModules/circularReference.ts] ////
//// [foo1.ts]
import foo2 = require('./foo2');
export module M1 {
export class C1 {
m1: foo2.M1.C1;
x: number;
constructor(){
this.m1 = new foo2.M1.C1();
this.m1.y = 10; // OK
this.m1.x = 20; // Error
}
}
}
//// [foo2.ts]
import foo1 = require('./foo1');
export module M1 {
export class C1 {
m1: foo1.M1.C1;
y: number
constructor(){
this.m1 = new foo1.M1.C1();
this.m1.y = 10; // Error
this.m1.x = 20; // OK
var tmp = new M1.C1();
tmp.y = 10; // OK
tmp.x = 20; // Error
}
}
}
//// [foo1.js]
"use strict";
exports.__esModule = true;
var foo2 = require("./foo2");
var M1;
(function (M1) {
var C1 = /** @class */ (function () {
function C1() {
this.m1 = new foo2.M1.C1();
this.m1.y = 10; // OK
this.m1.x = 20; // Error
}
return C1;
}());
M1.C1 = C1;
})(M1 = exports.M1 || (exports.M1 = {}));
//// [foo2.js]
"use strict";
exports.__esModule = true;
var foo1 = require("./foo1");
var M1;
(function (M1) {
var C1 = /** @class */ (function () {
function C1() {
this.m1 = new foo1.M1.C1();
this.m1.y = 10; // Error
this.m1.x = 20; // OK
var tmp = new M1.C1();
tmp.y = 10; // OK
tmp.x = 20; // Error
}
return C1;
}());
M1.C1 = C1;
})(M1 = exports.M1 || (exports.M1 = {}));
|