Now that export-ns-from has TC39 consensus the TC39 is looking for engines to implement.
Related: V8 issue and SpiderMonkey issue
Would a PR to implement this be appreciated?
@rhuanjl Yes, totally!
@jdalton I was looking for an answer from the CC team as conscious that if i write an implementation for this (as an external contributor) one of them has to review it, test it and merge it
cc @boingoing
I haven't heard anyone say they were picking this up yet internally so it should be good to go.
@rhuanjl We would definitely appreciate a contribution from you on this one and I would be happy to review it and marshal it through the checkin process.
Just to clarify what exactly this feature is, it's re-exporting a namespace object under an exported name?
@boingoing: Just to clarify what exactly this feature is, it's re-exporting a namespace object under an exported name?
yes! The syntax production was not possible before:
export * as ns from './module.js';
which is _almost_ a sugar for:
import * as ns from './module.js';
export { ns };
without necessarily importing a local ns binding.
I hope the tests from Test262 might help. @rhuanjl please let me know if you need any help from the tests.
Thanks all, I'll aim to do this over this weekend.
Most helpful comment
Would a PR to implement this be appreciated?