]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/types/models/video/video-live.ts
a899edfa60a9fe2de25a6481b69cfe7e2ac1d89d
[github/Chocobozzz/PeerTube.git] / server / types / models / video / video-live.ts
1 import { VideoLiveModel } from '@server/models/video/video-live'
2 import { PickWith } from '@shared/typescript-utils'
3 import { MVideo } from './video'
4 import { MLiveReplaySetting } from './video-live-replay-setting'
5
6 type Use<K extends keyof VideoLiveModel, M> = PickWith<VideoLiveModel, K, M>
7
8 // ############################################################################
9
10 export type MVideoLive = Omit<VideoLiveModel, 'Video' | 'ReplaySetting'>
11
12 // ############################################################################
13
14 export type MVideoLiveVideo =
15 MVideoLive &
16 Use<'Video', MVideo>
17
18 // ############################################################################
19
20 export type MVideoLiveVideoWithSetting =
21 MVideoLiveVideo &
22 Use<'ReplaySetting', MLiveReplaySetting>