Chakracore: Implement export-ns-from syntax.

Created on 5 Oct 2018  路  7Comments  路  Source: chakra-core/ChakraCore

Now that export-ns-from has TC39 consensus the TC39 is looking for engines to implement.

Related: V8 issue and SpiderMonkey issue

ECMAScript Spec Feature Request

Most helpful comment

Would a PR to implement this be appreciated?

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

d3x0r picture d3x0r  路  5Comments

obastemur picture obastemur  路  4Comments

tommyZZM picture tommyZZM  路  5Comments

Kureev picture Kureev  路  5Comments

YiWen-y picture YiWen-y  路  4Comments