PEP-228: новые сообщения чата появляются без перерисовки страницы #220

Merged
peppa-bot merged 16 commits from task/pep-228 into main 2026-11-21 16:06:41 +00:00
Showing only changes of commit 98ce49abaf - Show all commits

View File

@ -16,7 +16,7 @@ const user = (login: string) => core.upsertUserFromGitea(db, { id: 9100 + seq++,
type Msg = Record<string, unknown> & { t: string };
/** A connection driven directly: what the server sent and how it closed. */
function conn(u: core.User) {
function conn(u: import("@peppa/core").User) {
const out: Msg[] = [];
const closed: Array<{ code: number; reason: string }> = [];
const c = new LiveConnection(db, u, (m) => out.push(m as Msg), (code, reason) => closed.push({ code, reason }));