(value: unknown)
| 82 | }; |
| 83 | |
| 84 | const stringCodeOf = (value: unknown): string | undefined => { |
| 85 | if (typeof value !== "object" || value === null) return undefined; |
| 86 | const code = (value as { readonly code?: unknown }).code; |
| 87 | return typeof code === "string" ? code : undefined; |
| 88 | }; |
| 89 | |
| 90 | const driverCodesOf = (failure: unknown): readonly string[] => { |
| 91 | const codes: string[] = []; |