Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exporting destructured variables fails #382

Closed
easrng opened this issue Jan 23, 2025 · 1 comment · Fixed by quickjs-ng/quickjs#850
Closed

exporting destructured variables fails #382

easrng opened this issue Jan 23, 2025 · 1 comment · Fixed by quickjs-ng/quickjs#850

Comments

@easrng
Copy link

easrng commented Jan 23, 2025

minimal repro:

~ $ cat a.mjs
import * as mod from "./a.mjs"
export const { a, b, c } = { a: 1, b: 2, c: 3 };  export const d = 4;
console.log(JSON.stringify({                        type: typeof mod,
  keys: Object.keys(mod),
}));
~ $ node a.mjs
{"type":"object","keys":["a","b","c","d"]}
~ $ qjs -m a.mjs
{"type":"object","keys":["d"]}
~ $
@saghul
Copy link
Contributor

saghul commented Jan 24, 2025

I think I fixed it: quickjs-ng/quickjs#850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants