File: importTypeAmdBundleRewrite.js

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (48 lines) | stat: -rw-r--r-- 1,059 bytes parent folder | download
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
//// [tests/cases/conformance/types/import/importTypeAmdBundleRewrite.ts] ////

//// [c.ts]
export interface Foo {
    x: 12;
}
//// [inner.ts]
const c: import("./b/c").Foo = {x: 12};
export {c};

//// [index.ts]
const d: typeof import("./a/inner")["c"] = {x: 12};
export {d};


//// [bundle.js]
define("a/b/c", ["require", "exports"], function (require, exports) {
    "use strict";
    exports.__esModule = true;
});
define("a/inner", ["require", "exports"], function (require, exports) {
    "use strict";
    exports.__esModule = true;
    var c = { x: 12 };
    exports.c = c;
});
define("index", ["require", "exports"], function (require, exports) {
    "use strict";
    exports.__esModule = true;
    var d = { x: 12 };
    exports.d = d;
});


//// [bundle.d.ts]
declare module "a/b/c" {
    export interface Foo {
        x: 12;
    }
}
declare module "a/inner" {
    const c: import("a/b/c").Foo;
    export { c };
}
declare module "index" {
    const d: typeof import("a/inner")["c"];
    export { d };
}