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

Function isConstTypeReference

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

Source from the content-addressed store, hash-verified

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"
130}
131
132func GetSingleVariableOfVariableStatement(node *ast.Node) *ast.Node {
133 if !ast.IsVariableStatement(node) {

Callers 3

checkAssertionMethod · 0.85

Calls 6

IsTypeReferenceNodeFunction · 0.92
IsIdentifierFunction · 0.92
lenFunction · 0.85
AsTypeReferenceNodeMethod · 0.80
TextMethod · 0.65
TypeArgumentsMethod · 0.45

Tested by

no test coverage detected