diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-20 13:52:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-20 14:53:42 +0200 |
commit | 0283eaac2a8e73006c66df3cf5bb9012e37450e5 (patch) | |
tree | 1fb73aeef57f984a77f47828ade23c6365ce8eb0 /server/typings/models/video/video-file.ts | |
parent | 96ca24f00e5ae5471dee9ee596489fe50af2b46f (diff) | |
download | PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.gz PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.zst PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.zip |
Cleanup model types
Diffstat (limited to 'server/typings/models/video/video-file.ts')
-rw-r--r-- | server/typings/models/video/video-file.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/typings/models/video/video-file.ts b/server/typings/models/video/video-file.ts index afa659d1f..484351a8d 100644 --- a/server/typings/models/video/video-file.ts +++ b/server/typings/models/video/video-file.ts | |||
@@ -3,13 +3,17 @@ import { PickWith, PickWithOpt } from '../../utils' | |||
3 | import { MVideo, MVideoUUID } from './video' | 3 | import { MVideo, MVideoUUID } from './video' |
4 | import { MVideoRedundancyFileUrl } from './video-redundancy' | 4 | import { MVideoRedundancyFileUrl } from './video-redundancy' |
5 | 5 | ||
6 | type Use<K extends keyof VideoFileModel, M> = PickWith<VideoFileModel, K, M> | ||
7 | |||
8 | // ############################################################################ | ||
9 | |||
6 | export type MVideoFile = Omit<VideoFileModel, 'Video' | 'RedundancyVideos'> | 10 | export type MVideoFile = Omit<VideoFileModel, 'Video' | 'RedundancyVideos'> |
7 | 11 | ||
8 | export type MVideoFileVideo = MVideoFile & | 12 | export type MVideoFileVideo = MVideoFile & |
9 | PickWith<VideoFileModel, 'Video', MVideo> | 13 | Use<'Video', MVideo> |
10 | 14 | ||
11 | export type MVideoFileVideoUUID = MVideoFile & | 15 | export type MVideoFileVideoUUID = MVideoFile & |
12 | PickWith<VideoFileModel, 'Video', MVideoUUID> | 16 | Use<'Video', MVideoUUID> |
13 | 17 | ||
14 | export type MVideoFileRedundanciesOpt = MVideoFile & | 18 | export type MVideoFileRedundanciesOpt = MVideoFile & |
15 | PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> | 19 | PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> |