1
0
Fork 0
peertube/server/typings/models/video/video-rate.ts

17 lines
663 B
TypeScript
Raw Normal View History

2019-08-15 05:53:26 -04:00
import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
import { PickWith } from '@server/typings/utils'
import { MAccountAudience, MAccountUrl, MVideo } from '..'
2019-08-20 07:52:49 -04:00
type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M>
// ############################################################################
2019-08-15 05:53:26 -04:00
export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'>
export type MAccountVideoRateAccountUrl = MAccountVideoRate &
2019-08-20 07:52:49 -04:00
Use<'Account', MAccountUrl>
2019-08-15 05:53:26 -04:00
export type MAccountVideoRateAccountVideo = MAccountVideoRate &
2019-08-20 07:52:49 -04:00
Use<'Account', MAccountAudience> &
Use<'Video', MVideo>