2020-06-09 23:07:19 +02:00
|
|
|
import * as tg from "generic-type-guard";
|
|
|
|
|
|
|
|
export const isWebRtcSignalMessageInterface =
|
|
|
|
new tg.IsInterface().withProperties({
|
|
|
|
userId: tg.isString,
|
|
|
|
receiverId: tg.isString,
|
|
|
|
roomId: tg.isString,
|
|
|
|
signal: tg.isUnknown
|
|
|
|
}).get();
|
2020-06-14 14:47:16 +02:00
|
|
|
export const isWebRtcScreenSharingSignalMessageInterface =
|
|
|
|
new tg.IsInterface().withProperties({
|
|
|
|
userId: tg.isString,
|
|
|
|
roomId: tg.isString,
|
|
|
|
signal: tg.isUnknown
|
|
|
|
}).get();
|
|
|
|
export const isWebRtcScreenSharingStartMessageInterface =
|
|
|
|
new tg.IsInterface().withProperties({
|
|
|
|
userId: tg.isString,
|
|
|
|
roomId: tg.isString
|
|
|
|
}).get();
|
2020-06-09 23:07:19 +02:00
|
|
|
export type WebRtcSignalMessageInterface = tg.GuardedType<typeof isWebRtcSignalMessageInterface>;
|