-
Notifications
You must be signed in to change notification settings - Fork 45
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
Export Objects #129
Export Objects #129
Conversation
@@ -1131,7 +1131,7 @@ A <dfn>reflective module record</dfn> is a kind of module record. In addition to | |||
<tr> | |||
<td>\[[LocalExports]]</td> | |||
<td>A List of Strings</td> | |||
<td>The set of exported names stored in this module's environment.</td> | |||
<td>The set of exported names accessible in this module's environment.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not longer stored directly in the env record, but it is accessible from there.
I'm curious what happened to the descriptors? Why is the API all now exporting objects, no descriptors? It seems like it'd be handy to be handy to be able to getter/setters. |
@rektide the descriptors we had before were not object property descriptors, they were export descriptors. As for getter/setter, we have been drilling on the requirements, eventually we will provide that as a new feature, but that will require spec changes in 262 and discussions with implementers (which we have done some already), which will take longer. |
We have decided to maintain the old API (export descriptors). Few thoughts:
note: there are few editorial things from this PR that we will cherry-pick |
@dherman did I missed anything else here? |
Tagline: Formalizing a reflective API to create export bindings for Reflective Module Records.
Details
mutator
in favor of re-usable Export ObjectsReflect.Module.Export.let()
Reflect.Module.Export.var()
Reflect.Module.Export.const()
Reflect.Module.Export.from()
Usage
Re-exporing all from Module
Node Compat-Mode
Rendered HTML
https://rawgit.com/caridy/6430042924e0436918ea/raw/0f9e2224f1c29ac4449000f5350fdcb2ae439157/loader-pr129.html