• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//// [tests/cases/compiler/externalModuleAssignToVar.ts] ////
2
3//// [externalModuleAssignToVar_ext.ts]
4class D { foo: string; }
5export = D;
6
7//// [externalModuleAssignToVar_core_require.ts]
8export class C { bar: string; }
9
10//// [externalModuleAssignToVar_core_require2.ts]
11class C { baz: string; }
12export = C;
13
14//// [externalModuleAssignToVar_core.ts]
15///<reference path='externalModuleAssignToVar_core_require.ts'/>
16import ext = require('externalModuleAssignToVar_core_require');
17var y1: { C: new() => ext.C; } = ext;
18y1 = ext; // ok
19
20import ext2 = require('externalModuleAssignToVar_core_require2');
21var y2: new() => ext2 = ext2;
22y2 = ext2; // ok
23
24import ext3 = require('externalModuleAssignToVar_ext');
25var y3: new () => ext3 = ext3;
26y3 = ext3; // ok
27
28
29//// [externalModuleAssignToVar_core_require.js]
30define(["require", "exports"], function (require, exports) {
31    "use strict";
32    exports.__esModule = true;
33    exports.C = void 0;
34    var C = /** @class */ (function () {
35        function C() {
36        }
37        return C;
38    }());
39    exports.C = C;
40});
41//// [externalModuleAssignToVar_core_require2.js]
42define(["require", "exports"], function (require, exports) {
43    "use strict";
44    var C = /** @class */ (function () {
45        function C() {
46        }
47        return C;
48    }());
49    return C;
50});
51//// [externalModuleAssignToVar_ext.js]
52define(["require", "exports"], function (require, exports) {
53    "use strict";
54    var D = /** @class */ (function () {
55        function D() {
56        }
57        return D;
58    }());
59    return D;
60});
61//// [externalModuleAssignToVar_core.js]
62define(["require", "exports", "externalModuleAssignToVar_core_require", "externalModuleAssignToVar_core_require2", "externalModuleAssignToVar_ext"], function (require, exports, ext, ext2, ext3) {
63    "use strict";
64    exports.__esModule = true;
65    var y1 = ext;
66    y1 = ext; // ok
67    var y2 = ext2;
68    y2 = ext2; // ok
69    var y3 = ext3;
70    y3 = ext3; // ok
71});
72