@maschinenlesbar.org/bundeswahlleiterin-cli
    Preparing search index...

    Type Alias ElectionResult

    ElectionResult:
        | {
            reason: string;
            searched: { area: string; areaType?: AreaType };
            status: "empty";
        }
        | { candidates: Area[]; reason: string; status: "ambiguous" }
        | {
            area: Area;
            constituency?: { elected: string | null; mostFirstVotes?: string };
            parties: PartyResult[];
            status: "ok";
            turnout: {
                eligible: number | null;
                invalid: number | null;
                percent: number | null;
                valid: number | null;
                voters: number | null;
            };
            vote: Vote;
        }

    The answer of getElectionResult.

    Type Declaration

    • {
          reason: string;
          searched: { area: string; areaType?: AreaType };
          status: "empty";
      }
    • { candidates: Area[]; reason: string; status: "ambiguous" }
    • {
          area: Area;
          constituency?: { elected: string | null; mostFirstVotes?: string };
          parties: PartyResult[];
          status: "ok";
          turnout: {
              eligible: number | null;
              invalid: number | null;
              percent: number | null;
              valid: number | null;
              voters: number | null;
          };
          vote: Vote;
      }
      • area: Area
      • Optionalconstituency?: { elected: string | null; mostFirstVotes?: string }

        In a Wahlkreis: the party with the most first votes, and the party whose candidate was elected; under the 2025 law the winner gets the seat only if the party's second votes cover it, so elected can be none.

      • parties: PartyResult[]

        The parties of this ballot with votes, most votes first (parties without a candidate or list left out).

      • status: "ok"
      • turnout: {
            eligible: number | null;
            invalid: number | null;
            percent: number | null;
            valid: number | null;
            voters: number | null;
        }

        Wahlberechtigte, Wählende, turnout in percent; valid and invalid votes of this ballot.

      • vote: Vote