(record: Record<string, unknown>, key: string)
| 264 | } |
| 265 | |
| 266 | function readRequiredText(record: Record<string, unknown>, key: string): string { |
| 267 | const value = readOptionalText(record, key)?.trim(); |
| 268 | if (!value) throw new AppError('INVALID_ARGS', `${key} is required`); |
| 269 | return value; |
| 270 | } |
| 271 | |
| 272 | function readOptionalText(record: Record<string, unknown>, key: string): string | undefined { |
| 273 | const value = record[key]; |
no test coverage detected
searching dependent graphs…