PeerTube/server/typings/models/video/video-share.ts

18 lines
588 B
TypeScript
Raw Normal View History

2019-08-15 11:53:26 +02:00
import { VideoShareModel } from '../../../models/video/video-share'
import { PickWith } from '../../utils'
import { MActorDefault } from '../account'
import { MVideo } from './video'
2019-08-20 13:52:49 +02:00
type Use<K extends keyof VideoShareModel, M> = PickWith<VideoShareModel, K, M>
// ############################################################################
2019-08-15 11:53:26 +02:00
export type MVideoShare = Omit<VideoShareModel, 'Actor' | 'Video'>
export type MVideoShareActor = MVideoShare &
2019-08-20 13:52:49 +02:00
Use<'Actor', MActorDefault>
2019-08-15 11:53:26 +02:00
2019-08-20 13:52:49 +02:00
export type MVideoShareFull = MVideoShare &
Use<'Actor', MActorDefault> &
Use<'Video', MVideo>