(input: Record<string, unknown>)
| 20 | } |
| 21 | |
| 22 | function configIssues(input: Record<string, unknown>): ConfigIssue[] { |
| 23 | return Array.isArray(input.issues) |
| 24 | ? input.issues.filter((issue): issue is ConfigIssue => { |
| 25 | if (!isRecord(issue)) return false |
| 26 | return ( |
| 27 | typeof issue.message === "string" && |
| 28 | Array.isArray(issue.path) && |
| 29 | issue.path.every((x) => typeof x === "string") |
| 30 | ) |
| 31 | }) |
| 32 | : [] |
| 33 | } |
| 34 | |
| 35 | export function FormatError(input: unknown): string | undefined { |
| 36 | if (input instanceof Error && isRecord(input.cause) && "body" in input.cause) { |
no test coverage detected