You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
export { a as "hello world" } is valid JavaScript but invalid TypeScriptΒ #54584
// This typescript code...consta=34;export{aas"hello world"};
π Actual behavior
// ...generates this invalid JavaScript code.consta=34;export{aas}from"hello world";;
The input was valid JavaScript so I would expect (intuitively) for it to be valid TypeScript. This is currently not the case.
π Expected behavior
// I expected this JavaScript code to be generted:consta=34;export{aas"hello world"};
Current behavior in browsers and Node.js works with this syntax!
// But running this in the DevTools or Node.js REPL works just fine.awaitimport("data:text/javascript,"+encodeURIComponent(`const a = 34;export { a as "hello world" };`))
JavaScript seems to allow strings as import/export names:
Activity
Josh-Cena commentedon Jun 9, 2023
Duplicate of #40594
jcbhmr commentedon Jun 9, 2023
Oops! I didn't search thoroughly enough. π€¦ββοΈ