get and set in TypeScript
TypeScript uses getter/setter syntax that is like ActionScript3. class foo { private _bar: boolean = false; get bar(): boolean { return this._bar; } set bar(value: boolean) { this._bar = value; } } That will produce this JavaScript, using the ECMAScript 5 Object.defineProperty() feature.
https://stackoverflow.com/questions/12827266/get-and-set-in-typescript