* Walk backward through entries to find the last one with a uuid. * Some entry types (SummaryMessage, TagMessage) don't have one.
(logs: Entry[] | null)
| 489 | * Some entry types (SummaryMessage, TagMessage) don't have one. |
| 490 | */ |
| 491 | function findLastUuid(logs: Entry[] | null): UUID | undefined { |
| 492 | if (!logs) { |
| 493 | return undefined |
| 494 | } |
| 495 | const entry = logs.findLast(e => 'uuid' in e && e.uuid) |
| 496 | return entry && 'uuid' in entry ? (entry.uuid as UUID) : undefined |
| 497 | } |
| 498 | |
| 499 | /** |
| 500 | * Clear cached state for a session |
no outgoing calls
no test coverage detected