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

Make interface-defined modules work with CommonJS/ES6Module interop #405

Conversation

jeffmo
Copy link
Contributor

@jeffmo jeffmo commented Apr 22, 2015

With a normal CommonJS module, when the exports object is assigned we mark it as a CommonJS default export. This lets the flow system understand that it needs to be mapped properly to an ES6 ModuleNamespace object when imported from an ES6 module.

Declared modules, however, weren't treating their exports in this way as well. This fixes the issue by marking declared module exports as CJSDefault.

More tangibly, this PR fixes this issue: #400

@jeffmo jeffmo force-pushed the treat_interface_defs_exports_as_cjs_exports_object branch from 4b842a4 to 0dbdc2a Compare April 22, 2015 15:08
avikchaudhuri added a commit that referenced this pull request Apr 22, 2015
…js_exports_object

Make interface-defined modules work with CommonJS/ES6Module interop
@avikchaudhuri avikchaudhuri merged commit d23cc0a into facebook:master Apr 22, 2015
@jeffmo jeffmo deleted the treat_interface_defs_exports_as_cjs_exports_object branch April 22, 2015 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants