(value: unknown)
| 50 | } |
| 51 | |
| 52 | function readJobStatus(value: unknown): IndexJobStatus { |
| 53 | return value === 'indexing' || value === 'done' || value === 'error' ? value : 'unknown'; |
| 54 | } |
| 55 | |
| 56 | /** The job table. Anything that is not an array of records reads as no jobs. */ |
| 57 | export function readIndexJobs(raw: unknown): IndexJob[] { |