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

Function FormatOnSemicolon

internal/format/api.go:147–150  ·  view source on GitHub ↗
(ctx context.Context, sourceFile *ast.SourceFile, position int)

Source from the content-addressed store, hash-verified

145}
146
147func FormatOnSemicolon(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange {
148 semicolon := findImmediatelyPrecedingTokenOfKind(position, ast.KindSemicolonToken, sourceFile)
149 return formatNodeLines(ctx, sourceFile, findOutermostNodeWithinListLevel(semicolon), FormatRequestKindFormatOnSemicolon)
150}
151
152func FormatOnEnter(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange {
153 line := scanner.GetECMALineOfPosition(sourceFile, position)

Callers 1

Calls 3

formatNodeLinesFunction · 0.85

Tested by

no test coverage detected