aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-caption.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-20 13:52:49 +0200
committerChocobozzz <me@florianbigard.com>2019-08-20 14:53:42 +0200
commit0283eaac2a8e73006c66df3cf5bb9012e37450e5 (patch)
tree1fb73aeef57f984a77f47828ade23c6365ce8eb0 /server/typings/models/video/video-caption.ts
parent96ca24f00e5ae5471dee9ee596489fe50af2b46f (diff)
downloadPeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.gz
PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.zst
PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.zip
Cleanup model types
Diffstat (limited to 'server/typings/models/video/video-caption.ts')
-rw-r--r--server/typings/models/video/video-caption.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/typings/models/video/video-caption.ts b/server/typings/models/video/video-caption.ts
index 16d8b7392..fe0e664c2 100644
--- a/server/typings/models/video/video-caption.ts
+++ b/server/typings/models/video/video-caption.ts
@@ -2,9 +2,15 @@ import { VideoCaptionModel } from '../../../models/video/video-caption'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { VideoModel } from '@server/models/video/video' 3import { VideoModel } from '@server/models/video/video'
4 4
5type Use<K extends keyof VideoCaptionModel, M> = PickWith<VideoCaptionModel, K, M>
6
7// ############################################################################
8
5export type MVideoCaption = Omit<VideoCaptionModel, 'Video'> 9export type MVideoCaption = Omit<VideoCaptionModel, 'Video'>
6 10
11// ############################################################################
12
7export type MVideoCaptionLanguage = Pick<MVideoCaption, 'language'> 13export type MVideoCaptionLanguage = Pick<MVideoCaption, 'language'>
8 14
9export type MVideoCaptionVideo = MVideoCaption & 15export type MVideoCaptionVideo = MVideoCaption &
10 PickWith<VideoCaptionModel, 'Video', Pick<VideoModel, 'id' | 'remote' | 'uuid'>> 16 Use<'Video', Pick<VideoModel, 'id' | 'remote' | 'uuid'>>