19 lines
362 B
TypeScript
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;
|
|
}
|
|
}
|
|
}
|
|
|