refactor: migrate legacy wire namespace to wrn
This commit is contained in:
@@ -11,7 +11,7 @@ export interface BrowserRoomConnection {
|
||||
}
|
||||
|
||||
export interface WrnexusRealtimeWindow extends Window {
|
||||
wire?: {
|
||||
wrn?: {
|
||||
room?: (name: string, query?: string) => BrowserRoomConnection;
|
||||
};
|
||||
}
|
||||
@@ -40,7 +40,7 @@ export function connectRoom(
|
||||
): BrowserRoomConnection {
|
||||
const roomName = assertRealtimeRoomName(name);
|
||||
const target = options.window ?? (globalThis as unknown as WrnexusRealtimeWindow);
|
||||
const factory = target.wire?.room;
|
||||
const factory = target.wrn?.room;
|
||||
if (!factory) {
|
||||
throw new Error(
|
||||
"WRN-REALTIME-CLIENT-NOT-READY: add a RealtimeRoom/data-room component before calling connectRoom().",
|
||||
|
||||
Reference in New Issue
Block a user