TypeScript/tests/cases/compiler/memberVariableDeclarations1.ts
2014-07-12 17:30:19 -07:00

27 lines
546 B
TypeScript

// from spec
class Employee {
public name: string;
public address: string;
public retired = false;
public manager: Employee = null;
public reports: Employee[] = [];
}
class Employee2 {
public name: string;
public address: string;
public retired: boolean;
public manager: Employee;
public reports: Employee[];
constructor() {
this.retired = false;
this.manager = null;
this.reports = [];
}
}
var e1: Employee;
var e2: Employee2;
e1 = e2;
e2 = e1;