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

Support ECMA-262 arbitrary non-identifier module export names #54733

Closed
5 tasks done
guybedford opened this issue Jun 21, 2023 · 2 comments Β· Fixed by #58640
Closed
5 tasks done

Support ECMA-262 arbitrary non-identifier module export names #54733

guybedford opened this issue Jun 21, 2023 · 2 comments Β· Fixed by #58640
Labels
Fix Available A PR has been opened for this issue

Comments

@guybedford
Copy link
Contributor

Suggestion

πŸ” Search Terms

string exports, arbitrary identifier namespace names

βœ… Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

πŸ“ƒ Motivating Example

Example valid ECMA262 code that fails:

import { "some name" as impt } from 'external';
export { impt as "other name" }

See:

https://www.typescriptlang.org/play?ts=5.2.0-dev.20230621#code/KYDwDg9gTgLgBAbzmOBDAznARAC2AG3wjgHdp8ATLOAXyA

πŸ’» Use Cases

Allow TypeScript to support non-identifier export names per ECMA-262 support (tc39/ecma262#2154).

@MartinJohns
Copy link
Contributor

Duplicate of #40594.

@guybedford
Copy link
Contributor Author

Ahh, after seeing the issue I found the duplicates thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants