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

Function DeclarationNameToString

internal/scanner/utilities.go:76–81  ·  view source on GitHub ↗
(name *ast.Node)

Source from the content-addressed store, hash-verified

74}
75
76func DeclarationNameToString(name *ast.Node) string {
77 if name == nil || name.Pos() == name.End() {
78 return "(Missing)"
79 }
80 return GetTextOfNode(name)
81}
82
83func IsIdentifierText(name string, languageVariant core.LanguageVariant) bool {
84 ch, size := utf8.DecodeRuneInString(name)

Calls 3

GetTextOfNodeFunction · 0.85
PosMethod · 0.65
EndMethod · 0.65

Tested by

no test coverage detected