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

Function FormatOnClosingCurly

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

Source from the content-addressed store, hash-verified

140}
141
142func FormatOnClosingCurly(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange {
143 precedingToken := findImmediatelyPrecedingTokenOfKind(position, ast.KindCloseBraceToken, sourceFile)
144 return formatNodeLines(ctx, sourceFile, findOutermostNodeWithinListLevel(precedingToken), FormatRequestKindFormatOnClosingCurlyBrace)
145}
146
147func FormatOnSemicolon(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange {
148 semicolon := findImmediatelyPrecedingTokenOfKind(position, ast.KindSemicolonToken, sourceFile)

Callers 1

Calls 3

formatNodeLinesFunction · 0.85

Tested by

no test coverage detected