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

Function IsEntityNameExpressionEx

internal/ast/utilities.go:1599–1603  ·  view source on GitHub ↗
(node *Node, allowJS bool)

Source from the content-addressed store, hash-verified

1597}
1598
1599func IsEntityNameExpressionEx(node *Node, allowJS bool) bool {
1600 return IsIdentifier(node) ||
1601 IsPropertyAccessEntityNameExpression(node, allowJS) ||
1602 allowJS && (node.Kind == KindThisKeyword || isElementAccessEntityNameExpression(node, allowJS))
1603}
1604
1605func IsPropertyAccessEntityNameExpression(node *Node, allowJS bool) bool {
1606 return IsPropertyAccessExpression(node) && IsIdentifier(node.Name()) && IsEntityNameExpressionEx(node.Expression(), allowJS)

Tested by

no test coverage detected