File: typeFromPropertyAssignment10.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 (174 lines) | stat: -rw-r--r-- 5,564 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
=== tests/cases/conformance/salsa/module.js ===
var Outer = Outer || {};
>Outer : typeof Outer
>Outer || {} : typeof Outer | {}
>Outer : typeof Outer
>{} : {}

Outer.app = Outer.app || {};
>Outer.app = Outer.app || {} : typeof Outer.app
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>Outer.app || {} : {}
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>{} : {}

=== tests/cases/conformance/salsa/someview.js ===
Outer.app.SomeView = (function () {
>Outer.app.SomeView = (function () {    var SomeView = function() {        var me = this;    }    return SomeView;})() : () => void
>Outer.app.SomeView : () => void
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>SomeView : () => void
>(function () {    var SomeView = function() {        var me = this;    }    return SomeView;})() : () => void
>(function () {    var SomeView = function() {        var me = this;    }    return SomeView;}) : () => () => void
>function () {    var SomeView = function() {        var me = this;    }    return SomeView;} : () => () => void

    var SomeView = function() {
>SomeView : () => void
>function() {        var me = this;    } : () => void

        var me = this;
>me : any
>this : any
    }
    return SomeView;
>SomeView : () => void

})();
Outer.app.Inner = class {
>Outer.app.Inner = class {    constructor() {        /** @type {number} */        this.y = 12;    }} : typeof Inner
>Outer.app.Inner : typeof Inner
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>Inner : typeof Inner
>class {    constructor() {        /** @type {number} */        this.y = 12;    }} : typeof Inner

    constructor() {
        /** @type {number} */
        this.y = 12;
>this.y = 12 : 12
>this.y : number
>this : this
>y : number
>12 : 12
    }
}
var example = new Outer.app.Inner();
>example : Inner
>new Outer.app.Inner() : Inner
>Outer.app.Inner : typeof Inner
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>Inner : typeof Inner

example.y;
>example.y : number
>example : Inner
>y : number

/** @param {number} k */
Outer.app.statische = function (k) {
>Outer.app.statische = function (k) {    return k ** k;} : (k: number) => number
>Outer.app.statische : (k: number) => number
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>statische : (k: number) => number
>function (k) {    return k ** k;} : (k: number) => number
>k : number

    return k ** k;
>k ** k : number
>k : number
>k : number
}
=== tests/cases/conformance/salsa/application.js ===
Outer.app.Application = (function () {
>Outer.app.Application = (function () {    /**     * Application main class.     * Will be instantiated & initialized by HTML page     */    var Application = function () {        var me = this;        me.view = new Outer.app.SomeView();    };    return Application;})() : () => void
>Outer.app.Application : () => void
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>Application : () => void
>(function () {    /**     * Application main class.     * Will be instantiated & initialized by HTML page     */    var Application = function () {        var me = this;        me.view = new Outer.app.SomeView();    };    return Application;})() : () => void
>(function () {    /**     * Application main class.     * Will be instantiated & initialized by HTML page     */    var Application = function () {        var me = this;        me.view = new Outer.app.SomeView();    };    return Application;}) : () => () => void
>function () {    /**     * Application main class.     * Will be instantiated & initialized by HTML page     */    var Application = function () {        var me = this;        me.view = new Outer.app.SomeView();    };    return Application;} : () => () => void

    /**
     * Application main class.
     * Will be instantiated & initialized by HTML page
     */
    var Application = function () {
>Application : () => void
>function () {        var me = this;        me.view = new Outer.app.SomeView();    } : () => void

        var me = this;
>me : any
>this : any

        me.view = new Outer.app.SomeView();
>me.view = new Outer.app.SomeView() : any
>me.view : any
>me : any
>view : any
>new Outer.app.SomeView() : any
>Outer.app.SomeView : () => void
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>SomeView : () => void

    };
    return Application;
>Application : () => void

})();
=== tests/cases/conformance/salsa/main.js ===
var app = new Outer.app.Application();
>app : any
>new Outer.app.Application() : any
>Outer.app.Application : () => void
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>Application : () => void

var inner = new Outer.app.Inner();
>inner : Inner
>new Outer.app.Inner() : Inner
>Outer.app.Inner : typeof Inner
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>Inner : typeof Inner

inner.y;
>inner.y : number
>inner : Inner
>y : number

/** @type {Outer.app.Inner} */
var x;
>x : Inner

x.y;
>x.y : number
>x : Inner
>y : number

Outer.app.statische(101); // Infinity, duh
>Outer.app.statische(101) : number
>Outer.app.statische : (k: number) => number
>Outer.app : typeof Outer.app
>Outer : typeof Outer
>app : typeof Outer.app
>statische : (k: number) => number
>101 : 101