89 lines
1.5 KiB
Text
89 lines
1.5 KiB
Text
=== 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 : boolean
|
|
|
|
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 : boolean
|
|
>this.retired : boolean
|
|
>this : Employee2
|
|
>retired : boolean
|
|
>false : boolean
|
|
|
|
this.manager = null;
|
|
>this.manager = null : null
|
|
>this.manager : Employee
|
|
>this : Employee2
|
|
>manager : Employee
|
|
>null : null
|
|
|
|
this.reports = [];
|
|
>this.reports = [] : undefined[]
|
|
>this.reports : Employee[]
|
|
>this : Employee2
|
|
>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
|
|
|