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

Function IsSignedNumericLiteral

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

Source from the content-addressed store, hash-verified

333}
334
335func IsSignedNumericLiteral(node *Node) bool {
336 if node.Kind == KindPrefixUnaryExpression {
337 node := node.AsPrefixUnaryExpression()
338 return (node.Operator == KindPlusToken || node.Operator == KindMinusToken) && IsNumericLiteral(node.Operand)
339 }
340 return false
341}
342
343// Determines if a node is part of an OptionalChain
344func IsOptionalChain(node *Node) bool {

Callers 3

getDeclarationNameMethod · 0.92
IsDynamicNameFunction · 0.85

Calls 2

IsNumericLiteralFunction · 0.85

Tested by

no test coverage detected