microsoft / microsoft/TypeScript
[API] Expose globals declared by a source file
@andrewbranch đang làm issue này rồi.
Từ ngày 3/8/2026.
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.3k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 132
Mô tả
With TypeScript 6.x, TypeDoc supports documenting global files by documenting the globals defined in that file.
This was done somewhat hackily with:
```ts
result = checker.getSymbolsInScope(node, ts.SymbolFlags.ModuleMember)
.filter((s) =>
s
.getDeclarations()
?.some((d) => d.getSourceFile() === sourceFile)
);
```
@jakebailey told me on Discord that there is `SourceFile.Locals`, which would be a better way to get this information, but this isn't exposed in the JS API, so I'd like to request that!
Ref: https://github.com/TypeStrong/typedoc/issues/3098
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.