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
|
=== /test.js ===
class Abcde {
>Abcde : Symbol(Abcde, Decl(test.js, 0, 0), Decl(index.ts, 2, 25))
/** @type {string} */
x;
>x : Symbol(Abcde.x, Decl(test.js, 0, 13))
}
module.exports = {
>module.exports : Symbol("/test.js", Decl(test.js, 0, 0), Decl(index.ts, 0, 31))
>module : Symbol(module, Decl(test.js, 3, 1))
>exports : Symbol("/test.js", Decl(test.js, 0, 0), Decl(index.ts, 0, 31))
Abcde
>Abcde : Symbol(Abcde, Decl(test.js, 5, 18))
};
=== /index.ts ===
import { Abcde } from "./test";
>Abcde : Symbol(Abcde, Decl(index.ts, 0, 8))
declare module "./test" {
>"./test" : Symbol("/test", Decl(test.js, 0, 0), Decl(index.ts, 0, 31))
interface Abcde { b: string }
>Abcde : Symbol(Abcde, Decl(test.js, 0, 0), Decl(index.ts, 2, 25))
>b : Symbol(Abcde.b, Decl(index.ts, 3, 19))
}
new Abcde().x;
>new Abcde().x : Symbol(Abcde.x, Decl(test.js, 0, 13))
>Abcde : Symbol(Abcde, Decl(index.ts, 0, 8))
>x : Symbol(Abcde.x, Decl(test.js, 0, 13))
// Bug: the type meaning from /test.js does not
// propagate through the object literal export.
const x: Abcde = { b: "" };
>x : Symbol(x, Decl(index.ts, 10, 5))
>Abcde : Symbol(Abcde, Decl(index.ts, 0, 8))
>b : Symbol(b, Decl(index.ts, 10, 18))
|