Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    PipelineResult:
    ย ย ย ย | { ok: true; value: T; warnings?: readonly string[] }
    ย ย ย ย | { ok: false; error: string; warnings?: readonly string[] }

    Discriminated union result type for pipeline stages. The ok discriminant guarantees TypeScript can narrow to exactly one branch โ€” ok: true always carries value: T and never error; ok: false always carries error and never value. This prevents impossible states such as { ok: true, error: 'โ€ฆ' } and eliminates the need for non-null assertions in well-typed consumers.

    Type Parameters

    • T