(value: unknown)
| 61 | }; |
| 62 | |
| 63 | const stringCodeOf = (value: unknown): string | undefined => { |
| 64 | if (typeof value !== "object" || value === null) return undefined; |
| 65 | const code = (value as { readonly code?: unknown }).code; |
| 66 | return typeof code === "string" ? code : undefined; |
| 67 | }; |
| 68 | |
| 69 | const driverCodesOf = (failure: unknown): readonly string[] => { |
| 70 | const codes: string[] = []; |