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

Function isCompoundLikeAssignment

internal/checker/utilities.go:123–126  ·  view source on GitHub ↗
(assignment *ast.Node)

Source from the content-addressed store, hash-verified

121}
122
123func isCompoundLikeAssignment(assignment *ast.Node) bool {
124 right := ast.SkipParentheses(assignment.AsBinaryExpression().Right)
125 return right.Kind == ast.KindBinaryExpression && isShiftOperatorOrHigher(right.AsBinaryExpression().OperatorToken.Kind)
126}
127
128func isConstTypeReference(node *ast.Node) bool {
129 return ast.IsTypeReferenceNode(node) && len(node.TypeArguments()) == 0 && ast.IsIdentifier(node.AsTypeReferenceNode().TypeName) && node.AsTypeReferenceNode().TypeName.Text() == "const"

Callers 1

Calls 3

SkipParenthesesFunction · 0.92
AsBinaryExpressionMethod · 0.80
isShiftOperatorOrHigherFunction · 0.70

Tested by

no test coverage detected