-
Notifications
You must be signed in to change notification settings - Fork 1
/
liveblocks.config.ts
47 lines (40 loc) · 1.05 KB
/
liveblocks.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { LiveMap } from "@liveblocks/client";
// https://liveblocks.io/docs/api-reference/liveblocks-react#Typing-your-data
declare global {
interface Liveblocks {
// Each user's Presence, for useMyPresence, useOthers, etc.
Presence: {
cursor: {
x: number;
y: number;
} | null;
message: string;
};
// The Storage tree for the room, for useMutation, useStorage, etc.
Storage: {
canvasObjects: LiveMap<string, any>;
};
// Custom user info set when authenticating with a secret key
UserMeta: {
id: string;
};
// Custom events, for useBroadcastEvent, useEventListener
RoomEvent: {};
// | { type: "PLAY" }
// | { type: "REACTION"; emoji: "🔥" };
ThreadMetadata: {
x: number;
y: number;
time?: number;
resolved: boolean;
zIndex: number;
};
// Custom room info set with resolveRoomsInfo, for useRoomInfo
RoomInfo: {
// Example, rooms with a title and url
// title: string;
// url: string;
};
}
}
export {};