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

Method GetDeclarationMap

internal/ast/ast.go:2838–2845  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2836}
2837
2838func (node *SourceFile) GetDeclarationMap() map[string][]*Node {
2839 node.declarationMapMu.Lock()
2840 defer node.declarationMapMu.Unlock()
2841 if node.declarationMap == nil {
2842 node.declarationMap = node.computeDeclarationMap()
2843 }
2844 return node.declarationMap
2845}
2846
2847func (node *SourceFile) computeDeclarationMap() map[string][]*Node {
2848 result := make(map[string][]*Node)

Callers 1

ProvideWorkspaceSymbolsFunction · 0.80

Calls 3

computeDeclarationMapMethod · 0.95
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected