Civet
Civet copied to clipboard
Extending import renaming shortcut `exportedName: importedName` to `export from`
trafficstars
Input code
export { s: t } from ./stuff
Expected output
export { s as t } from "./stuff"
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.