MCPcopy Create free account
hub / github.com/microsoft/typescript-go / GetSourceFileOfModule

Function GetSourceFileOfModule

internal/ast/utilities.go:3552–3558  ·  view source on GitHub ↗
(module *Symbol)

Source from the content-addressed store, hash-verified

3550}
3551
3552func GetSourceFileOfModule(module *Symbol) *SourceFile {
3553 declaration := module.ValueDeclaration
3554 if declaration == nil {
3555 declaration = GetNonAugmentationDeclaration(module)
3556 }
3557 return GetSourceFileOfNode(declaration)
3558}
3559
3560func GetNonAugmentationDeclaration(symbol *Symbol) *Node {
3561 return core.Find(symbol.Declarations, func(d *Node) bool {

Callers 6

SymbolToExportFunction · 0.92
getResolvedPackageNamesFunction · 0.92
symbolToTypeNodeMethod · 0.92

Calls 2

GetSourceFileOfNodeFunction · 0.85

Tested by

no test coverage detected