pxt-ev3/libs/core/core.ts
Peli de Halleux 580b40876c fixing bumped
2017-11-28 16:02:04 -08:00

19 lines
362 B
TypeScript

namespace control {
let nextComponentId: number;
export class Component {
protected _id: number;
constructor(id = 0) {
if (!nextComponentId)
nextComponentId = 20000
if (!id) id = ++nextComponentId
this._id = id
}
id() {
return this._id;
}
}
}