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

Function GetRootDeclaration

internal/ast/utilities.go:1154–1159  ·  view source on GitHub ↗
(node *Node)

Source from the content-addressed store, hash-verified

1152}
1153
1154func GetRootDeclaration(node *Node) *Node {
1155 for node.Kind == KindBindingElement {
1156 node = node.Parent.Parent
1157 }
1158 return node
1159}
1160
1161func getCombinedFlags[T ~uint32](node *Node, getFlags func(*Node) T) T {
1162 node = GetRootDeclaration(node)

Calls

no outgoing calls

Tested by

no test coverage detected