Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // module.mjs
- let importantId = null
- function run () {
- return something()
- .then(() => {
- importantId = 'aaaa'
- })
- }
- export default {
- run,
- importantId
- }
- // index.mjs
- import mod from './module'
- run().then(() => {
- console.log(mod.importantId) // null
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement