More strict typecheck fixes

This commit is contained in:
David Négrier 2020-06-03 22:32:43 +02:00
parent a231024502
commit 111bfcfe8c
3 changed files with 28 additions and 23 deletions

View file

@ -112,7 +112,7 @@ export interface ConnectionInterface {
sharePosition(x: number, y: number, direction: string, moving: boolean): void;
/*webrtc*/
sendWebrtcSignal(signal: any, roomId: string, userId?: string, receiverId?: string): void;
sendWebrtcSignal(signal: any, roomId: string, userId?: string|null, receiverId?: string): void;
receiveWebrtcSignal(callBack: Function): void;
@ -268,7 +268,7 @@ export class Connection implements ConnectionInterface {
})
}
sendWebrtcSignal(signal: any, roomId: string, userId? : string, receiverId? : string) {
sendWebrtcSignal(signal: any, roomId: string, userId? : string|null, receiverId? : string) {
return this.getSocket().emit(EventMessage.WEBRTC_SIGNAL, {
userId: userId ? userId : this.userId,
receiverId: receiverId ? receiverId : this.userId,