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
|
=== tests/cases/compiler/memberVariableDeclarations1.ts ===
// from spec
class Employee {
>Employee : Employee
public name: string;
>name : string
public address: string;
>address : string
public retired = false;
>retired : boolean
>false : false
public manager: Employee = null;
>manager : Employee
>Employee : Employee
>null : null
public reports: Employee[] = [];
>reports : Employee[]
>Employee : Employee
>[] : undefined[]
}
class Employee2 {
>Employee2 : Employee2
public name: string;
>name : string
public address: string;
>address : string
public retired: boolean;
>retired : boolean
public manager: Employee;
>manager : Employee
>Employee : Employee
public reports: Employee[];
>reports : Employee[]
>Employee : Employee
constructor() {
this.retired = false;
>this.retired = false : false
>this.retired : boolean
>this : this
>retired : boolean
>false : false
this.manager = null;
>this.manager = null : null
>this.manager : Employee
>this : this
>manager : Employee
>null : null
this.reports = [];
>this.reports = [] : undefined[]
>this.reports : Employee[]
>this : this
>reports : Employee[]
>[] : undefined[]
}
}
var e1: Employee;
>e1 : Employee
>Employee : Employee
var e2: Employee2;
>e2 : Employee2
>Employee2 : Employee2
e1 = e2;
>e1 = e2 : Employee2
>e1 : Employee
>e2 : Employee2
e2 = e1;
>e2 = e1 : Employee
>e2 : Employee2
>e1 : Employee
|