File: transformsElideNullUndefinedType.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 (175 lines) | stat: -rw-r--r-- 3,270 bytes parent folder | download | duplicates (5)
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
175
=== tests/cases/compiler/transformsElideNullUndefinedType.ts ===
var v0: null;
>v0 : null
>null : null

var v1: undefined;
>v1 : undefined

function f0(): null { return null; }
>f0 : () => null
>null : null
>null : null

function f1(): undefined { return undefined; }
>f1 : () => undefined
>undefined : undefined

var f2 = function (): null { return null; }
>f2 : () => null
>function (): null { return null; } : () => null
>null : null
>null : null

var f3 = function (): undefined { return undefined; }
>f3 : () => undefined
>function (): undefined { return undefined; } : () => undefined
>undefined : undefined

var f4 = (): null => null;
>f4 : () => null
>(): null => null : () => null
>null : null
>null : null

var f5 = (): undefined => undefined;
>f5 : () => undefined
>(): undefined => undefined : () => undefined
>undefined : undefined

function f6(p0: null) { }
>f6 : (p0: null) => void
>p0 : null
>null : null

function f7(p1: undefined) { }
>f7 : (p1: undefined) => void
>p1 : undefined

var f8 = function (p2: null) { }
>f8 : (p2: null) => void
>function (p2: null) { } : (p2: null) => void
>p2 : null
>null : null

var f9 = function (p3: undefined) { }
>f9 : (p3: undefined) => void
>function (p3: undefined) { } : (p3: undefined) => void
>p3 : undefined

var f10 = (p4: null) => { }
>f10 : (p4: null) => void
>(p4: null) => { } : (p4: null) => void
>p4 : null
>null : null

var f11 = (p5: undefined) => { }
>f11 : (p5: undefined) => void
>(p5: undefined) => { } : (p5: undefined) => void
>p5 : undefined

class C1 {
>C1 : C1

    m0(): null { return null; }
>m0 : () => null
>null : null
>null : null

    m1(): undefined { return undefined; }
>m1 : () => undefined
>undefined : undefined

    m3(p6: null) { }
>m3 : (p6: null) => void
>p6 : null
>null : null

    m4(p7: undefined) { }
>m4 : (p7: undefined) => void
>p7 : undefined

    get a0(): null { return null; }
>a0 : null
>null : null
>null : null

    get a1(): undefined { return undefined; }
>a1 : undefined
>undefined : undefined

    set a2(p8: null) { }
>a2 : null
>p8 : null
>null : null

    set a3(p9: undefined) { }
>a3 : undefined
>p9 : undefined
}

class C2 { constructor(p10: null) { } }
>C2 : C2
>p10 : null
>null : null

class C3 { constructor(p11: undefined) { } }
>C3 : C3
>p11 : undefined

class C4 {
>C4 : C4

    f1;
>f1 : any

    constructor(p12: null) { }
>p12 : null
>null : null
}

class C5 {
>C5 : C5

    f2;
>f2 : any

    constructor(p13: undefined) { }
>p13 : undefined
}

var C6 = class { constructor(p12: null) { } }
>C6 : typeof C6
>class { constructor(p12: null) { } } : typeof C6
>p12 : null
>null : null

var C7 = class { constructor(p13: undefined) { } }
>C7 : typeof C7
>class { constructor(p13: undefined) { } } : typeof C7
>p13 : undefined

declare function fn<T>();
>fn : <T>() => any

fn<null>();
>fn<null>() : any
>fn : <T>() => any
>null : null

fn<undefined>();
>fn<undefined>() : any
>fn : <T>() => any

declare class D<T> {}
>D : D<T>

new D<null>();
>new D<null>() : D<null>
>D : typeof D
>null : null

new D<undefined>();
>new D<undefined>() : D<undefined>
>D : typeof D