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

Extending import renaming shortcut exportedName: importedName to export from #1092

Open
esthedebeste opened this issue Mar 7, 2024 · 1 comment

Comments

@esthedebeste
Copy link
Contributor

Input code

export { s: t } from ./stuff

Expected output

export { s as t } from "./stuff"

playground link

@STRd6
Copy link
Contributor

STRd6 commented Mar 7, 2024

This seems to be a little tricky to unify with object notation since:

{ s: t } from ./stuff makes sense as s as t but:

export { s: t } makes more sense as export { t as s }

The challenge comes when combining them in the same statement it depends on if viewing the object as part of the export or import; lhs/rhs to determine which order they should go in.

Or maybe I'm overthinking it and : is just a shorthand for as in this context.

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

No branches or pull requests

2 participants