saguijs / babel-preset-sagui

[Deprecated] Babel preset used by Sagui
1 stars 0 forks source link

What about class property transform #3

Open xaviervia opened 8 years ago

xaviervia commented 8 years ago

While trying out adding the flow type transform I noticed that class properties are not working. I tried out adding it as well and it works without problems. Any reason not to?

https://babeljs.io/docs/plugins/transform-class-properties/

pirelenito commented 8 years ago

I think this is the reason:

https://github.com/saguijs/babel-preset-sagui/blob/master/index.js#L33

pirelenito commented 8 years ago

Ok, stupid answer... sorry. Different thing! 🙈

Do you know how far this is as becoming a spec?

xaviervia commented 8 years ago

Nope. I don't know how to know. The proposal comes from here, which seems pretty unofficial: https://github.com/jeffmo/es-class-fields-and-static-properties

We can keep the thread open, even if class properties is not added flowtype will work, just that flowtype for classes will not. Not a big deal in my personal opinion since we are moving away from classes anyway, but it means support will be incomplete.