[api-extractor] Support string literals in named exports (e.g. `export { foo as "module.exports" }`)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- nodejs, typescript
- Domain
- tooling
Research direction
Start with the @microsoft/api-extractor rollups scenario and reproduce the issue using the provided .d.ts declaration with a string-literal named export. Trace how the declaration is processed and verify that the export name remains "module.exports" rather than becoming module.exports.
Written by the indexing model from the issue text.
Description
Summary
Support string literals in named exports (e.g. export { foo as "module.exports" })
Repro steps
Use '@microsoft/api-extractor' to bundle a list of type definition files.
One of which contains a string literal named export
Expected result:
declare const foo = "bar";
export { foo as 'module.exports' };
Actual result:
declare const foo = "bar";
export { foo as module.exports };
Details
See: https://joyeecheung.github.io/blog/2025/12/30/require-esm-in-node-js-implementers-tales/
Standard questions
Please answer these questions to help us investigate your issue more quickly:
| Question | Answer |
|---|---|
@microsoft/api-extractor version? |
latest |
| Operating system? | max |
| API Extractor scenario? | rollups |
| Would you consider contributing a PR? | No |
| TypeScript compiler version? | latest |
Node.js version (node -v)? |
latest |
- Dominant language
- TypeScript
- Stars
- 6.5k
- Forks
- 708
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 62
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/rushstack
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in microsoft/rushstack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
receptron/mulmoterminal#2264 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
components-web-app/docs#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
simonsobs/tileviewer#114 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100