Exporting a Module Instance Object

# Kevin Smith (11 years ago)

Is it possible to export a module instance object?

module x from "x";
export { x };

I believe this should be allowed. I'm not aware of a technical reason why it shouldn't, and not allowing it would restrict some valid design options.

For instance, within a package I might have a module which exports a set of functions 1. I want to expose those functions as a part of the package API, but "under" an exported name 2.

Thanks!

# Sam Tobin-Hochstadt (11 years ago)

Yes, this should work fine.