You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Export objects or classes before their declaration makes them undefined (T6919) #3947
Hello @mqklin. I think the examples are actually correct. class and let are not hoisted in the sense you mean, but I believe it's fair game to reference them in the export declaration like that, and live bindings are exported. So with real module support I think those examples should work. Perhaps the transform should be re-assigning to the export wherever the local identifier is re-assigned, e.g.:
Activity
babel-bot commentedon Jan 5, 2016
Seems like it's not a bug, but a typo in mozilla.hacks article, isn't it? Because objects and classes are not hoisted.
babel-bot commentedon Jan 5, 2016
Hello @mqklin. I think the examples are actually correct.
classandletare not hoisted in the sense you mean, but I believe it's fair game to reference them in the export declaration like that, and live bindings are exported. So with real module support I think those examples should work. Perhaps the transform should be re-assigning to the export wherever the local identifier is re-assigned, e.g.: