(error: unknown)
| 46 | } |
| 47 | |
| 48 | function stringValue(record: JsonRecord, key: string): string | undefined { |
| 49 | return typeof record[key] === 'string' ? record[key] : undefined; |
| 50 | } |
| 51 | |
| 52 | function errorCode(error: unknown): string | undefined { |
| 53 | return isRecord(error) && typeof error.code === 'string' ? error.code : undefined; |