microsoft / microsoft/TypeScript
[API] Expose globals declared by a source file
Offen
@andrewbranch arbeitet bereits daran.
Seit 03.8.2026.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
With TypeScript 6.x, TypeDoc supports documenting global files by documenting the globals defined in that file.
This was done somewhat hackily with:
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!
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.