File: exportNestedNamespaces.types

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 (87 lines) | stat: -rw-r--r-- 1,705 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
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
=== tests/cases/conformance/salsa/mod.js ===
exports.n = {};
>exports.n = {} : typeof n
>exports.n : typeof n
>exports : typeof import("tests/cases/conformance/salsa/mod")
>n : typeof n
>{} : {}

exports.n.K = function () {
>exports.n.K = function () {    this.x = 10;} : typeof K
>exports.n.K : typeof K
>exports.n : typeof n
>exports : typeof import("tests/cases/conformance/salsa/mod")
>n : typeof n
>K : typeof K
>function () {    this.x = 10;} : typeof K

    this.x = 10;
>this.x = 10 : 10
>this.x : any
>this : typeof n
>x : any
>10 : 10
}
exports.Classic = class {
>exports.Classic = class {    constructor() {        this.p = 1    }} : typeof Classic
>exports.Classic : typeof Classic
>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 : K
>new s.n.K() : K
>s.n.K : typeof K
>s.n : typeof s.n
>s : typeof s
>n : typeof s.n
>K : typeof K

k.x
>k.x : number
>k : K
>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: K, classic: Classic) => void
>c : K
>classic : Classic

    c.x
>c.x : number
>c : K
>x : number

    classic.p
>classic.p : number
>classic : Classic
>p : number
}