microsoft / microsoft/TypeScript

[API] Expose globals declared by a source file

Offen
#63,871 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@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!

Ref: https://github.com/TypeStrong/typedoc/issues/3098

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.