mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Ditching strings and exchanging buffers
This commit is contained in:
parent
cdd7f6158b
commit
05ba0339fe
8 changed files with 258 additions and 74 deletions
|
@ -16,7 +16,7 @@ export type CHUNK_INFO = {
|
|||
|
||||
export type CLIENT_MESSAGE_RAW = {
|
||||
type: "relay" | "pull" | "push";
|
||||
payload: string;
|
||||
payload: Uint8Array;
|
||||
chunkInfo?: CHUNK_INFO;
|
||||
};
|
||||
|
||||
|
@ -26,7 +26,12 @@ export type CLIENT_MESSAGE = { chunkInfo: CHUNK_INFO } & (
|
|||
| { type: "push"; payload: PUSH_PAYLOAD }
|
||||
);
|
||||
|
||||
export type SERVER_DELTA = { id: string; version: number; payload: string };
|
||||
export type SERVER_DELTA = {
|
||||
id: string;
|
||||
version: number;
|
||||
// CFDO: should be type-safe
|
||||
payload: Record<string, any>;
|
||||
};
|
||||
export type SERVER_MESSAGE =
|
||||
| {
|
||||
type: "relayed";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue