Erik, this was in regards to Alex asking about a TypeScript emitter for AS - > TS. I said TS doesn't support property inheritance yet, so you would have to rename properties to set/get when doing a TS emitter. The I said, some AS dev might already have a setFoo() where they also have a set foo(value:Object)
Mike On Mon, Jun 15, 2015 at 2:08 PM, Erik de Bruin <e...@ixsoftware.nl> wrote: > > > > As far as subclassing, it handles it fine, it's properties that they > don't > > support right now. As I said previously, they say call Java like mutator > > methods. So if you wrote an emitter, all properties would be converted to > > "setFoo(), getFoo()" but that could be a conflict as some AS code could > > actually contain those methods. > > > > I just tried this: > > <code> > class Hello { > > constructor () { > this.myProp_ = ''; > } > > get myProp() { > return this.myProp_; > } > > set myProp(value) { > this.myProp_ = value; > } > > } > </code> > > Which compiles fine, the output uses 'Object.defineProperties()' to create > the getter and setter on the prototype. I don't see 'getMyProp()' or > something. Did I misread your statement? > > EdB > > > > -- > Ix Multimedia Software > > Jan Luykenstraat 27 > 3521 VB Utrecht > > T. 06-51952295 > I. www.ixsoftware.nl >