2016-05-02 19:57:28 -07:00

11 lines
154 B
TypeScript

let nextId = 1;
export class Hero {
id: number;
constructor(
public name: string,
public power?: string) {
this.id = nextId++;
}
}