( record: CommandSessionRecord, )
| 315 | } |
| 316 | |
| 317 | function assertSnapshotSessionRecord( |
| 318 | record: CommandSessionRecord, |
| 319 | ): CommandSessionRecord & { snapshot: NonNullable<CommandSessionRecord['snapshot']> } { |
| 320 | if (!record.snapshot) { |
| 321 | throw new AppError('UNKNOWN', 'snapshot runtime did not produce session state'); |
| 322 | } |
| 323 | return record as CommandSessionRecord & { |
| 324 | snapshot: NonNullable<CommandSessionRecord['snapshot']>; |
| 325 | }; |
| 326 | } |
| 327 | |
| 328 | function toRecordedSnapshotRuntimeResult(record: SnapshotRuntimeRecord): Record<string, unknown> { |
| 329 | if (record.kind === 'snapshot') { |
no outgoing calls
no test coverage detected