(raw: unknown)
| 73 | |
| 74 | /** The acknowledgement of POST /api/index. */ |
| 75 | export function readIndexStarted(raw: unknown): IndexStarted { |
| 76 | const record = isRecord(raw) ? raw : {}; |
| 77 | return { slot: optionalNumber(record['slot']) ?? -1, path: text(record['path']) }; |
| 78 | } |
| 79 | |
| 80 | /** True while at least one job is still running, which is when the panel keeps asking. */ |
| 81 | export function anyIndexing(jobs: readonly IndexJob[]): boolean { |
no test coverage detected