(value: unknown)
| 374 | } |
| 375 | |
| 376 | function turnIdFromValue(value: unknown): string | undefined { |
| 377 | const record = asRecord(value) |
| 378 | if (typeof record.turnId === "string" && record.turnId.length > 0) return record.turnId |
| 379 | if (typeof record.id === "string" && record.id.length > 0) return record.id |
| 380 | const turn = asRecord(record.turn) |
| 381 | if (typeof turn.id === "string" && turn.id.length > 0) return turn.id |
| 382 | return undefined |
| 383 | } |
| 384 | |
| 385 | function threadIdFromValue(value: unknown): string | undefined { |
| 386 | const record = asRecord(value) |
no test coverage detected