| export function readStatusIssueFields<TField extends string>( | |
| value: unknown, | |
| fields: readonly TField[], | |
| ): Record<TField, unknown> | null { | |
| if (!value || typeof value !== "object") { | |
| return null; | |
| } | |
| const record = value as Record<string, unknown>; | |
| const result = {} as Record<TField, unknown>; | |
| for (const field of fields) { | |
| result[field] = record[field]; | |
| } | |
| return result; | |
| } | |
| export function coerceStatusIssueAccountId(value: unknown): string | undefined { | |
| return typeof value === "string" ? value : typeof value === "number" ? String(value) : undefined; | |
| } | |