loganfsmyth / babel-plugin-transform-decorators-legacy

A plugin for Babel 6 that (mostly) replicates the old decorator behavior from Babel 5
MIT License
817 stars 57 forks source link

fix(property-decorator): set configurable=true #44

Closed doktordirk closed 8 years ago

doktordirk commented 8 years ago

current version leaves the property non-configurable.this prevents aurelia from observing the property see https://github.com/SpoonX/aurelia-orm/issues/177 see https://github.com/aurelia/framework/issues/541

doktordirk commented 8 years ago

ps: i didn't quite get the tests. so, i couldn't add one resp adjust the current ones

LordZardeck commented 8 years ago

This fixes my issue with observing properties with a decorator.

loganfsmyth commented 8 years ago

Unfortunately this isn't the proper forum for this discussion. These are currently non-configurable per the specced behavior. See step 9.a.iii.4, where the descriptor is specified to be configurable: false.

You could certainly set up a decorator that would change the property to configurable if you wanted.

doktordirk commented 8 years ago

tx for the quick response and darn!

doktordirk commented 8 years ago

@loganfsmyth so were would be the proper forum to discuss this? as i see it this still is a problem with this implementation of decorators and not with the spec, since there's nothing about setting configurable:false in the specs as i see it https://github.com/wycats/javascript-decorators

RWOverdijk commented 8 years ago

@loganfsmyth I +1 this and the question. Where can this be discussed further? We don't have this issue with typescript.

loganfsmyth commented 8 years ago

@RWOverdijk Here: https://github.com/tc39/proposal-class-public-fields/issues/36