microsoft / microsoft/TypeScript
[API] Expose globals declared by a source file
@andrewbranch ci sta già lavorando.
Dal 3/8/2026.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.