Modules: do re-exports also import?
# David Herman (12 years ago)
On Aug 4, 2013, at 8:01 AM, Axel Rauschmayer <axel at rauschma.de> wrote:
My guess: if you re-export something from a module, then you still have to import it if you want to use it in that module. Is that correct?
Correct.
Examples of re-exporting:
export * from "crypto"; // re-exporting another module's exports export { foo, bar } from "crypto"; // re-exporting specified exports from another moduleThat seems redundant. Maybe one could mark things that should be re-exported when importing them? On the other hand, this may be rare enough that it doesn’t warrant the extra syntax.
Not worth it. We can consider more conveniences post-ES6 but I doubt even then this particular one would be worth it.
My guess: if you re-export something from a module, then you still have to import it if you want to use it in that module. Is that correct?
Examples of re-exporting:
That seems redundant. Maybe one could mark things that should be re-exported when importing them? On the other hand, this may be rare enough that it doesn’t warrant the extra syntax.
My guess: if you re-export something from a module, then you still have to import it if you want to use it in that module. Is that correct? Examples of re-exporting: export * from "crypto"; // re-exporting another module's exports export { foo, bar } from "crypto"; // re-exporting specified exports from another module That seems redundant. Maybe one could mark things that should be re-exported when importing them? On the other hand, this may be rare enough that it doesn’t warrant the extra syntax. -- Dr. Axel Rauschmayer axel at rauschma.de home: rauschma.de twitter: twitter.com/rauschma blog: 2ality.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130804/bc6615a5/attachment-0001.html>