2020-06-09 23:07:19 +02:00
|
|
|
import * as tg from "generic-type-guard";
|
|
|
|
|
2020-08-18 15:31:42 +02:00
|
|
|
export const isSignalData =
|
|
|
|
new tg.IsInterface().withProperties({
|
|
|
|
type: tg.isOptional(tg.isString)
|
|
|
|
}).get();
|
|
|
|
|
2020-06-09 23:07:19 +02:00
|
|
|
export const isWebRtcSignalMessageInterface =
|
|
|
|
new tg.IsInterface().withProperties({
|
2020-09-18 13:57:38 +02:00
|
|
|
receiverId: tg.isNumber,
|
2020-08-18 15:31:42 +02:00
|
|
|
signal: isSignalData
|
2020-06-09 23:07:19 +02:00
|
|
|
}).get();
|
2020-06-14 14:47:16 +02:00
|
|
|
export const isWebRtcScreenSharingStartMessageInterface =
|
|
|
|
new tg.IsInterface().withProperties({
|
2020-09-18 13:57:38 +02:00
|
|
|
userId: tg.isNumber,
|
2020-06-14 14:47:16 +02:00
|
|
|
roomId: tg.isString
|
|
|
|
}).get();
|
2020-06-09 23:07:19 +02:00
|
|
|
export type WebRtcSignalMessageInterface = tg.GuardedType<typeof isWebRtcSignalMessageInterface>;
|