PEP-228: новые сообщения чата появляются без перерисовки страницы #220
@ -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 }));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user