File: transformsElideNullUndefinedType.ts

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 (60 lines) | stat: -rw-r--r-- 1,233 bytes parent folder | download | duplicates (7)
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
// @target: es6

var v0: null;
var v1: undefined;

function f0(): null { return null; }
function f1(): undefined { return undefined; }

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

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

function f6(p0: null) { }
function f7(p1: undefined) { }

var f8 = function (p2: null) { }
var f9 = function (p3: undefined) { }

var f10 = (p4: null) => { }
var f11 = (p5: undefined) => { }

class C1 {
    m0(): null { return null; }
    m1(): undefined { return undefined; }

    m3(p6: null) { }
    m4(p7: undefined) { }

    get a0(): null { return null; }
    get a1(): undefined { return undefined; }

    set a2(p8: null) { }
    set a3(p9: undefined) { }
}

class C2 { constructor(p10: null) { } }
class C3 { constructor(p11: undefined) { } }

class C4 {
    f1;
    constructor(p12: null) { }
}

class C5 {
    f2;
    constructor(p13: undefined) { }
}

var C6 = class { constructor(p12: null) { } }
var C7 = class { constructor(p13: undefined) { } }

declare function fn<T>();
fn<null>();
fn<undefined>();

declare class D<T> {}
new D<null>();
new D<undefined>();