Being able to access the export object from the module object enables a
pattern we use locally, which is roughly
require("myModule").configParameter = xyz;
..
exports.errorReporter, exports.configParameter are then used heavily within
the module -- normally, they are not even set by the user, but they there
in case the user needs to override some behaviour.
Shouldn't that already be possible? Only the (top-level) exports
are non-modifiable, so I think this would work:
module M {
let configParameter = default;
export function setConfigParameter(value){ configParameter = value }
export ..other code using configParameter..
}
Looking forward to modules shims and implementations, so
that we can verify and harmonize our interpretations of the spec.
Claus
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss