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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
=== tests/cases/conformance/salsa/mod.js ===
module.exports.n = {};
>module.exports.n = {} : typeof n
>module.exports.n : typeof n
>module.exports : typeof import("tests/cases/conformance/salsa/mod")
>module : { "tests/cases/conformance/salsa/mod": typeof import("tests/cases/conformance/salsa/mod"); }
>exports : typeof import("tests/cases/conformance/salsa/mod")
>n : typeof n
>{} : {}
module.exports.n.K = function C() {
>module.exports.n.K = function C() { this.x = 10;} : typeof C
>module.exports.n.K : typeof C
>module.exports.n : typeof n
>module.exports : typeof import("tests/cases/conformance/salsa/mod")
>module : { "tests/cases/conformance/salsa/mod": typeof import("tests/cases/conformance/salsa/mod"); }
>exports : typeof import("tests/cases/conformance/salsa/mod")
>n : typeof n
>K : typeof C
>function C() { this.x = 10;} : typeof C
>C : typeof C
this.x = 10;
>this.x = 10 : 10
>this.x : any
>this : typeof n
>x : any
>10 : 10
}
module.exports.Classic = class {
>module.exports.Classic = class { constructor() { this.p = 1 }} : typeof Classic
>module.exports.Classic : typeof Classic
>module.exports : typeof import("tests/cases/conformance/salsa/mod")
>module : { "tests/cases/conformance/salsa/mod": typeof import("tests/cases/conformance/salsa/mod"); }
>exports : typeof import("tests/cases/conformance/salsa/mod")
>Classic : typeof Classic
>class { constructor() { this.p = 1 }} : typeof Classic
constructor() {
this.p = 1
>this.p = 1 : 1
>this.p : number
>this : this
>p : number
>1 : 1
}
}
=== tests/cases/conformance/salsa/use.js ===
import * as s from './mod'
>s : typeof s
var k = new s.n.K()
>k : C
>new s.n.K() : C
>s.n.K : typeof C
>s.n : typeof s.n
>s : typeof s
>n : typeof s.n
>K : typeof C
k.x
>k.x : number
>k : C
>x : number
var classic = new s.Classic()
>classic : Classic
>new s.Classic() : Classic
>s.Classic : typeof Classic
>s : typeof s
>Classic : typeof Classic
/** @param {s.n.K} c
@param {s.Classic} classic */
function f(c, classic) {
>f : (c: C, classic: Classic) => void
>c : C
>classic : Classic
c.x
>c.x : number
>c : C
>x : number
classic.p
>classic.p : number
>classic : Classic
>p : number
}
|