TypeScript/tests/baselines/reference/memberVariableDeclarations1.js
2014-08-14 06:42:18 -07:00

52 lines
1,023 B
TypeScript

//// [memberVariableDeclarations1.ts]
// 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;
//// [memberVariableDeclarations1.js]
// from spec
var Employee = (function () {
function Employee() {
this.retired = false;
this.manager = null;
this.reports = [];
}
return Employee;
})();
var Employee2 = (function () {
function Employee2() {
this.retired = false;
this.manager = null;
this.reports = [];
}
return Employee2;
})();
var e1;
var e2;
e1 = e2;
e2 = e1;