(text: string)
| 214 | } |
| 215 | |
| 216 | function parseJsonObject<T>(text: string): T { |
| 217 | const parsed = JSON.parse(text); |
| 218 | if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) { |
| 219 | throw new Error("Expected JSON object"); |
| 220 | } |
| 221 | return parsed as T; |
| 222 | } |
| 223 | |
| 224 | function isoFromMs(ms: number | undefined, fallback: Date): string { |
| 225 | return new Date( |
no outgoing calls
no test coverage detected