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

Function hasCommentsBeforeLineBreak

internal/ls/change/trackerimpl.go:293–300  ·  view source on GitHub ↗

============= utilities =============

(text string, start int)

Source from the content-addressed store, hash-verified

291// ============= utilities =============
292
293func hasCommentsBeforeLineBreak(text string, start int) bool {
294 for _, ch := range []rune(text[start:]) {
295 if !stringutil.IsWhiteSpaceSingleLine(ch) {
296 return ch == '/'
297 }
298 }
299 return false
300}
301
302func needSemicolonBetween(a, b *ast.Node) bool {
303 return (ast.IsPropertySignatureDeclaration(a) || ast.IsPropertyDeclaration(a)) &&

Callers 1

InsertNodeInListAfterMethod · 0.85

Calls 1

IsWhiteSpaceSingleLineFunction · 0.92

Tested by

no test coverage detected