refactor: migrate legacy wire namespace to wrn
This commit is contained in:
1 parent
ec23dd4c93
commit
2c960fc1dc
488 files changed
+27306
-19063
No files matched your search
@@ -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