aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-streaming-playlist.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-streaming-playlist.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-streaming-playlist.ts')
-rw-r--r--server/typings/models/video/video-streaming-playlist.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/typings/models/video/video-streaming-playlist.ts b/server/typings/models/video/video-streaming-playlist.ts
index 5b6310771..f1b3438b6 100644
--- a/server/typings/models/video/video-streaming-playlist.ts
+++ b/server/typings/models/video/video-streaming-playlist.ts
@@ -3,10 +3,14 @@ import { PickWith } from '../../utils'
3import { MVideoRedundancyFileUrl } from './video-redundancy' 3import { MVideoRedundancyFileUrl } from './video-redundancy'
4import { MVideo } from '@server/typings/models' 4import { MVideo } from '@server/typings/models'
5 5
6type Use<K extends keyof VideoStreamingPlaylistModel, M> = PickWith<VideoStreamingPlaylistModel, K, M>
7
8// ############################################################################
9
6export type MStreamingPlaylist = Omit<VideoStreamingPlaylistModel, 'Video' | 'RedundancyVideos'> 10export type MStreamingPlaylist = Omit<VideoStreamingPlaylistModel, 'Video' | 'RedundancyVideos'>
7 11
8export type MStreamingPlaylistVideo = MStreamingPlaylist & 12export type MStreamingPlaylistVideo = MStreamingPlaylist &
9 PickWith<VideoStreamingPlaylistModel, 'Video', MVideo> 13 Use<'Video', MVideo>
10 14
11export type MStreamingPlaylistRedundancies = MStreamingPlaylist & 15export type MStreamingPlaylistRedundancies = MStreamingPlaylist &
12 PickWith<VideoStreamingPlaylistModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> 16 Use<'RedundancyVideos', MVideoRedundancyFileUrl[]>