27 lines
No EOL
546 B
TypeScript
27 lines
No EOL
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; |