fix join socket type

This commit is contained in:
Reto Brunner 2024-04-07 14:52:45 +02:00
parent 35e38d13c4
commit 9c4d24d1f7
2 changed files with 7 additions and 9 deletions

View file

@ -41,10 +41,3 @@ export type SharedChan = {
closed?: boolean; closed?: boolean;
num_users?: number; num_users?: number;
}; };
export type InitClientChan = {
network: string;
chan: SharedNetworkChan;
shouldOpen: boolean;
index: number;
};

View file

@ -1,5 +1,5 @@
import {SharedMention} from "./mention"; import {SharedMention} from "./mention";
import {ChanState, InitClientChan, SharedChan} from "./chan"; import {ChanState, SharedChan} from "./chan";
import {SharedNetwork} from "./network"; import {SharedNetwork} from "./network";
import {SharedMsg, LinkPreview} from "./msg"; import {SharedMsg, LinkPreview} from "./msg";
import {SharedUser} from "./user"; import {SharedUser} from "./user";
@ -93,7 +93,12 @@ interface ServerToClientEvents {
connecting: NoPayloadEventHandler; connecting: NoPayloadEventHandler;
join: EventHandler<{shouldOpen: boolean; index: number; network: string; chan: InitClientChan}>; join: EventHandler<{
shouldOpen: boolean;
index: number;
network: string;
chan: SharedNetworkChan;
}>;
} }
interface ClientToServerEvents { interface ClientToServerEvents {