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

Function getNonModuleSymbolOfMergedModuleSymbol

internal/ls/utilities.go:61–70  ·  view source on GitHub ↗
(symbol *ast.Symbol)

Source from the content-addressed store, hash-verified

59}
60
61func getNonModuleSymbolOfMergedModuleSymbol(symbol *ast.Symbol) *ast.Symbol {
62 if len(symbol.Declarations) == 0 || (symbol.Flags&(ast.SymbolFlagsModule|ast.SymbolFlagsTransient)) == 0 {
63 return nil
64 }
65
66 if decl := core.Find(symbol.Declarations, func(d *ast.Node) bool { return !ast.IsSourceFile(d) && !ast.IsModuleDeclaration(d) }); decl != nil {
67 return decl.Symbol()
68 }
69 return nil
70}
71
72func getLocalSymbolForExportSpecifier(referenceLocation *ast.Node, referenceSymbol *ast.Symbol, exportSpecifier *ast.ExportSpecifier, ch *checker.Checker) *ast.Symbol {
73 if isExportSpecifierAlias(referenceLocation, exportSpecifier) {

Callers 1

createSearchMethod · 0.85

Calls 5

FindFunction · 0.92
IsSourceFileFunction · 0.92
IsModuleDeclarationFunction · 0.92
lenFunction · 0.85
SymbolMethod · 0.65

Tested by

no test coverage detected