File: multipleDeclarations.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 (139 lines) | stat: -rw-r--r-- 2,769 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
=== tests/cases/conformance/salsa/input.js ===
function C() {
>C : typeof C

    this.m = null;
>this.m = null : null
>this.m : any
>this : any
>m : any
>null : null
}
C.prototype.m = function() {
>C.prototype.m = function() {    this.nothing();} : () => void
>C.prototype.m : any
>C.prototype : any
>C : typeof C
>prototype : any
>m : any
>function() {    this.nothing();} : () => void

    this.nothing();
>this.nothing() : error
>this.nothing : error
>this : C
>nothing : any
}
class X {
>X : X

    constructor() {
        this.m = this.m.bind(this);
>this.m = this.m.bind(this) : any
>this.m : () => void
>this : this
>m : () => void
>this.m.bind(this) : any
>this.m.bind : (this: Function, thisArg: any, ...argArray: any[]) => any
>this.m : () => void
>this : this
>m : () => void
>bind : (this: Function, thisArg: any, ...argArray: any[]) => any
>this : this

        this.mistake = 'frankly, complete nonsense';
>this.mistake = 'frankly, complete nonsense' : "frankly, complete nonsense"
>this.mistake : () => void
>this : this
>mistake : () => void
>'frankly, complete nonsense' : "frankly, complete nonsense"
    }
    m() {
>m : () => void
    }
    mistake() {
>mistake : () => void
    }
}
let x = new X();
>x : X
>new X() : X
>X : typeof X

X.prototype.mistake = false;
>X.prototype.mistake = false : false
>X.prototype.mistake : () => void
>X.prototype : X
>X : typeof X
>prototype : X
>mistake : () => void
>false : false

x.m();
>x.m() : void
>x.m : () => void
>x : X
>m : () => void

x.mistake;
>x.mistake : () => void
>x : X
>mistake : () => void

class Y {
>Y : Y

    mistake() {
>mistake : () => void
    }
    m() {
>m : () => void
    }
    constructor() {
        this.m = this.m.bind(this);
>this.m = this.m.bind(this) : any
>this.m : () => void
>this : this
>m : () => void
>this.m.bind(this) : any
>this.m.bind : (this: Function, thisArg: any, ...argArray: any[]) => any
>this.m : () => void
>this : this
>m : () => void
>bind : (this: Function, thisArg: any, ...argArray: any[]) => any
>this : this

        this.mistake = 'even more nonsense';
>this.mistake = 'even more nonsense' : "even more nonsense"
>this.mistake : () => void
>this : this
>mistake : () => void
>'even more nonsense' : "even more nonsense"
    }
}
Y.prototype.mistake = true;
>Y.prototype.mistake = true : true
>Y.prototype.mistake : () => void
>Y.prototype : Y
>Y : typeof Y
>prototype : Y
>mistake : () => void
>true : true

let y = new Y();
>y : Y
>new Y() : Y
>Y : typeof Y

y.m();
>y.m() : void
>y.m : () => void
>y : Y
>m : () => void

y.mistake();
>y.mistake() : void
>y.mistake : () => void
>y : Y
>mistake : () => void