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

Function getEnclosingContainer

internal/checker/utilities.go:1231–1235  ·  view source on GitHub ↗
(node *ast.Node)

Source from the content-addressed store, hash-verified

1229}
1230
1231func getEnclosingContainer(node *ast.Node) *ast.Node {
1232 return ast.FindAncestor(node.Parent, func(n *ast.Node) bool {
1233 return binder.GetContainerFlags(n)&binder.ContainerFlagsIsContainer != 0
1234 })
1235}
1236
1237func getDeclarationsOfKind(symbol *ast.Symbol, kind ast.Kind) []*ast.Node {
1238 return core.Filter(symbol.Declarations, func(d *ast.Node) bool { return d.Kind == kind })

Callers 1

Calls 2

FindAncestorFunction · 0.92
GetContainerFlagsFunction · 0.92

Tested by

no test coverage detected