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

Function containsErrorCode

internal/ls/codeactions.go:379–381  ·  view source on GitHub ↗

containsErrorCode checks if the error code is in the list

(codes []int32, code int32)

Source from the content-addressed store, hash-verified

377
378// containsErrorCode checks if the error code is in the list
379func containsErrorCode(codes []int32, code int32) bool {
380 return slices.Contains(codes, code)
381}
382
383// convertToLSPCodeAction converts an internal CodeAction to an LSP CodeAction
384func convertToLSPCodeAction(action *CodeAction, diag *lsproto.Diagnostic, uri lsproto.DocumentUri) lsproto.CommandOrCodeAction {

Calls 1

ContainsMethod · 0.65

Tested by

no test coverage detected