I have two javascript modules that looks like this:
// inner/mod.js
export function myFunc() {
// ...
}
// mod.js
import * as inner from "./inner/mod";
I would like to export myFunc from mod.js. How can I do this?
EDIT: I should clarify that the function is being exported as expected from inner/mod.js but I also want to export the function from the outer mod.js.
To those asking for clarification, I would like to achieve this:
// SomeOtherFile.js
import * as mod from "mod"; // NOT inner/mod
mod.myFunc();
mod. Notice there are no export statements.