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

Function getModuleInstanceState

internal/ast/utilities.go:2307–2314  ·  view source on GitHub ↗
(node *Node, ancestors []*Node, visited map[NodeId]ModuleInstanceState)

Source from the content-addressed store, hash-verified

2305}
2306
2307func getModuleInstanceState(node *Node, ancestors []*Node, visited map[NodeId]ModuleInstanceState) ModuleInstanceState {
2308 module := node.AsModuleDeclaration()
2309 if module.Body != nil {
2310 return getModuleInstanceStateCached(module.Body, pushAncestor(ancestors, node), visited)
2311 } else {
2312 return ModuleInstanceStateInstantiated
2313 }
2314}
2315
2316func getModuleInstanceStateCached(node *Node, ancestors []*Node, visited map[NodeId]ModuleInstanceState) ModuleInstanceState {
2317 if visited == nil {

Callers 2

GetModuleInstanceStateFunction · 0.85

Calls 3

pushAncestorFunction · 0.85
AsModuleDeclarationMethod · 0.80

Tested by

no test coverage detected