Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/JAVA/Openclaw/extensions/msteams/src/   (KI Agentensystem Version 22©)  Datei vom 26.3.2026 mit Größe 951 B image not shown  

Quelle  polls-store-memory.ts

  Sprache: JAVA
 

import {
  type MSTeamsPoll,
  type MSTeamsPollStore,
  normalizeMSTeamsPollSelections,
} from "./polls.js";

export function createMSTeamsPollStoreMemory(initial: MSTeamsPoll[] = []): MSTeamsPollStore {
  const polls = new Map<string, MSTeamsPoll>();
  for (const poll of initial) {
    polls.set(poll.id, { ...poll });
  }

  const createPoll = async (poll: MSTeamsPoll) => {
    polls.set(poll.id, { ...poll });
  };

  const getPoll = async (pollId: string) => polls.get(pollId) ?? null;

  const recordVote = async (params: { pollId: string; voterId: string; selections: string[] }) => {
    const poll = polls.get(params.pollId);
    if (!poll) {
      return null;
    }
    const normalized = normalizeMSTeamsPollSelections(poll, params.selections);
    poll.votes[params.voterId] = normalized;
    poll.updatedAt = new Date().toISOString();
    polls.set(poll.id, poll);
    return poll;
  };

  return { createPoll, getPoll, recordVote };
}

Messung V0.5 in Prozent
C=99 H=96 G=97

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.