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

Function wantsQuickFixes

internal/ls/codeactions.go:247–257  ·  view source on GitHub ↗

wantsQuickFixes returns true if the Only filter is nil/empty (meaning all kinds are wanted) or explicitly includes the quickfix kind.

(only *[]lsproto.CodeActionKind)

Source from the content-addressed store, hash-verified

245// wantsQuickFixes returns true if the Only filter is nil/empty (meaning all kinds are wanted)
246// or explicitly includes the quickfix kind.
247func wantsQuickFixes(only *[]lsproto.CodeActionKind) bool {
248 if only == nil || len(*only) == 0 {
249 return true
250 }
251 for _, kind := range *only {
252 if codeActionKindContains(kind, lsproto.CodeActionKindQuickFix) {
253 return true
254 }
255 }
256 return false
257}
258
259// createFixAllAction creates a source.fixAll code action that applies all auto-fixable
260// code fixes across the file.

Callers 1

ProvideCodeActionsMethod · 0.85

Calls 2

lenFunction · 0.85
codeActionKindContainsFunction · 0.85

Tested by

no test coverage detected