Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models: Add support for ES6 class fields (through a babel plugin) #726

Closed
Duckers opened this issue Nov 10, 2017 · 1 comment · Fixed by fuse-open/transpiler#3
Closed

Comments

@Duckers
Copy link
Contributor

Duckers commented Nov 10, 2017

The default es2015 implementation does not support class fields, but most transpiler environments are configured to support it anyway. So instead of

class Foo {
     constructor() { this.bar = 1 }
}

we can simply write

class Foo {
    bar = 1
}

I've done some googling but not been able to determine what is the most kosher plugin to use.

@sebbert
Copy link
Contributor

sebbert commented Nov 10, 2017

This feature is still in proposal stage 3, and not yet part of any ECMAScript standard. Therefore, I'm reluctant to include it - as we can introduce this later on without breaking user code, but not the other way around.

most transpiler environments are configured to support it anyway

Do you have any data to support this claim?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants