Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[api-extractor] Support string literals in named exports (e.g. `export { foo as "module.exports" }`)

Đang mở
#5,549 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
nodejs, typescript
Lĩnh vực
tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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:

https://www.typescriptlang.org/play/?ts=5.9.3#code/MYewdgzgLgBAZiEMC8MDkAjAhgJzQbgChCBTADwAcQdYBveRGLCdAWxABMBXAGxIDpyVGhDQwAvkA

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
Ngôn ngữ chính
TypeScript
Star
6.5k
Fork
708
Merge trung bình
4 ngày 13 giờ
Pull request đã merge (30 ngày)
62

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/rushstack

Tất cả issue của microsoft/rushstack

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.