File: genericDefaultsJs.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 (80 lines) | stat: -rw-r--r-- 1,517 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
// @checkJs: true
// @allowJs: true
// @noEmit: true
// @filename: decls.d.ts
declare function f0<T>(x?: T): T;
declare function f1<T, U = number>(x?: T): [T, U];
declare class C0<T> {
    y: T;
    constructor(x?: T);
}
declare class C1<T, U = number> {
    y: [T, U];
    constructor(x?: T);
}
// @filename: main.js
const f0_v0 = f0();
const f0_v1 = f0(1);

const f1_c0 = f1();
const f1_c1 = f1(1);

const C0_v0 = new C0();
const C0_v0_y = C0_v0.y;

const C0_v1 = new C0(1);
const C0_v1_y = C0_v1.y;

const C1_v0 = new C1();
const C1_v0_y = C1_v0.y;

const C1_v1 = new C1(1);
const C1_v1_y = C1_v1.y;

class C0_B0 extends C0 {}
class C0_B1 extends C0 {
    constructor() {
        super();
    }
}
class C0_B2 extends C0 {
    constructor() {
        super(1);
    }
}

const C0_B0_v0 = new C0_B0();
const C0_B0_v0_y = C0_B0_v0.y;

const C0_B0_v1 = new C0_B0(1);
const C0_B0_v1_y = C0_B0_v1.y;

const C0_B1_v0 = new C0_B1();
const C0_B1_v0_y = C0_B1_v0.y;

const C0_B2_v0 = new C0_B2();
const C0_B2_v0_y = C0_B2_v0.y;

class C1_B0 extends C1 {}
class C1_B1 extends C1 {
    constructor() {
        super();
    }
}
class C1_B2 extends C1 {
    constructor() {
        super(1);
    }
}

const C1_B0_v0 = new C1_B0();
const C1_B0_v0_y = C1_B0_v0.y;

const C1_B0_v1 = new C1_B0(1);
const C1_B0_v1_y = C1_B0_v1.y;

const C1_B1_v0 = new C1_B1();
const C1_B1_v0_y = C1_B1_v0.y;

const C1_B2_v0 = new C1_B2();
const C1_B2_v0_y = C1_B2_v0.y;