MCPcopy Index your code
hub / github.com/microsoft/typescript-go / Fail

Function Fail

internal/debug/debug.go:7–15  ·  view source on GitHub ↗
(reason string)

Source from the content-addressed store, hash-verified

5)
6
7func Fail(reason string) {
8 if len(reason) == 0 {
9 reason = "Debug failure."
10 } else {
11 reason = "Debug failure. " + reason
12 }
13 // runtime.Breakpoint()
14 panic(reason)
15}
16
17func FailBadSyntaxKind(node interface{ KindString() string }, message ...any) {
18 var msg string

Callers 15

typeNodeToExpressionFunction · 0.92
AddImportFixMethod · 0.92
pseudoTypeToTypeMethod · 0.92
visitMethod · 0.92
isNamedEvaluationAndFunction · 0.92

Calls 2

lenFunction · 0.85
panicFunction · 0.85

Tested by 2

TestFailEmptyReasonFunction · 0.74
TestFailWithReasonFunction · 0.74