Can somebody explain this to me? Let's say I have these two modules:
// moduleTwo.js
export const module2Func = () => {
return 2
}
And
// moduleOne.js
export * from './moduleTwo'
export const module1Func = () => {
return 1
}
And then I import moduleOne somewhere:
import * as final from './moduleOne'
console.log(final)
Then final results into something likes this:
{ module2Func: [Getter], module1Func: [Function: module1Func] }
Why is module2Func
wrapped into a Getter
? It is the export from
that syntax does that? All functions work as expected. I'm using Babel 6 to transpiler code.
Thank you for any kind of explanation!