(value: unknown)
| 52 | } |
| 53 | |
| 54 | function extractTokenTotal(value: unknown): number | undefined { |
| 55 | if (typeof value === "number") { |
| 56 | return value; |
| 57 | } |
| 58 | |
| 59 | if (!isRecord(value)) { |
| 60 | return undefined; |
| 61 | } |
| 62 | |
| 63 | const total = value.total; |
| 64 | return typeof total === "number" ? total : undefined; |
| 65 | } |
| 66 | |
| 67 | function extractOptionalTokenCount( |
| 68 | record: Record<string, unknown>, |
no test coverage detected