Skip to content
This repository was archived by the owner on Mar 29, 2018. It is now read-only.

Conversation

@eventualbuddha
Copy link
Contributor

@caridy @domenic

This should allow the module transpiler to work properly when classes are exported. I believe the three cases @caridy added are tested in this PR.

Closes #176.

eventualbuddha added a commit that referenced this pull request Nov 4, 2014
Add support for exporting ES6 classes.
@eventualbuddha eventualbuddha merged commit cb36ece into master Nov 4, 2014
@eventualbuddha eventualbuddha deleted the es6-class-support branch November 4, 2014 04:26
@caridy
Copy link
Contributor

caridy commented Nov 4, 2014

🍻

@matthewrobb
Copy link
Contributor

@caridy Should this fix all the issues or do the formatters need updated to support?

@caridy
Copy link
Contributor

caridy commented Nov 4, 2014

no, I don't think we need to change any formatter. They should just work. You can try it, and report back :)

@matthewrobb
Copy link
Contributor

Yeah I am getting an error, hold on a sec

EDIT: Object #<SystemFormatter> has no method 'processClassDeclaration'

@eventualbuddha
Copy link
Contributor Author

In most cases formatters can probably just implement processClassDeclaration with the same body as processFunctionDeclaration, with the exception that class declarations don't hoist.

@caridy
Copy link
Contributor

caridy commented Nov 4, 2014

@eventualbuddha can we make that the default behavior for all formatters? my assumption is that most formatters will just do nothing but retain the declaration.

@eventualbuddha
Copy link
Contributor Author

Discussed on #esnext-infrastructure. We're going to leave the es6-module-transpiler as-is and ask formatters to implement processClassDeclaration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support for classes

4 participants