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

18 lines
588 B
TypeScript
Raw Normal View History

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