-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issue
Description
Suggestion
The new ES2022 standard allows to use string literals in module exports and imports:
import {"\0 any unicode" as foo} from "";
export {foo as "\0 any unicode"};
Ref: tc39/ecma262#2154
This feature is supported in NodeJS since v16(2021) and I have been using this feature but typescript complains about invalid syntax and I don't see this feature in the roadmap?.
🔍 Search Terms
String literals import and export
✅ 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.
Metadata
Metadata
Assignees
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issue