Closed eventualbuddha closed 9 years ago
:beers:
@caridy Should this fix all the issues or do the formatters need updated to support?
no, I don't think we need to change any formatter. They should just work. You can try it, and report back :)
Yeah I am getting an error, hold on a sec
EDIT: Object #<SystemFormatter> has no method 'processClassDeclaration'
In most cases formatters can probably just implement processClassDeclaration
with the same body as processFunctionDeclaration
, with the exception that class declarations don't hoist.
@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.
Discussed on #esnext-infrastructure. We're going to leave the es6-module-transpiler as-is and ask formatters to implement processClassDeclaration
.
@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.