File: typeMatch1.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (82 lines) | stat: -rw-r--r-- 1,298 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
=== tests/cases/compiler/typeMatch1.ts ===
interface I { z; }
>z : any

interface I2 { z; }
>z : any

var x1: { z: number; f(n: number): string; f(s: string): number; }
>x1 : { z: number; f(n: number): string; f(s: string): number; }
>z : number
>f : { (n: number): string; (s: string): number; }
>n : number
>f : { (n: number): string; (s: string): number; }
>s : string

var x2: { z:number;f:{(n:number):string;(s:string):number;}; } = x1;
>x2 : { z: number; f: { (n: number): string; (s: string): number; }; }
>z : number
>f : { (n: number): string; (s: string): number; }
>n : number
>s : string
>x1 : { z: number; f(n: number): string; f(s: string): number; }

var i:I;
>i : I

var i2:I2;
>i2 : I2

var x3:{ z; }= i;
>x3 : { z: any; }
>z : any
>i : I

var x4:{ z; }= i2;
>x4 : { z: any; }
>z : any
>i2 : I2

var x5:I=i2;
>x5 : I
>i2 : I2

class C { private x; }
>C : C
>x : any

class D { private x; }
>D : D
>x : any

var x6=new C();
>x6 : C
>new C() : C
>C : typeof C

var x7=new D();
>x7 : D
>new D() : D
>D : typeof D

x6 = x7;
>x6 = x7 : D
>x6 : C
>x7 : D

x6=C;
>x6=C : typeof C
>x6 : C
>C : typeof C

C==D;
>C==D : boolean
>C : typeof C
>D : typeof D

C==C;
>C==C : boolean
>C : typeof C
>C : typeof C