aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-share.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-share.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-share.ts')
-rw-r--r--server/typings/models/video/video-share.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/server/typings/models/video/video-share.ts b/server/typings/models/video/video-share.ts
index 7e8cb8b61..a7a90beeb 100644
--- a/server/typings/models/video/video-share.ts
+++ b/server/typings/models/video/video-share.ts
@@ -3,10 +3,15 @@ import { PickWith } from '../../utils'
3import { MActorDefault } from '../account' 3import { MActorDefault } from '../account'
4import { MVideo } from './video' 4import { MVideo } from './video'
5 5
6type Use<K extends keyof VideoShareModel, M> = PickWith<VideoShareModel, K, M>
7
8// ############################################################################
9
6export type MVideoShare = Omit<VideoShareModel, 'Actor' | 'Video'> 10export type MVideoShare = Omit<VideoShareModel, 'Actor' | 'Video'>
7 11
8export type MVideoShareActor = MVideoShare & 12export type MVideoShareActor = MVideoShare &
9 PickWith<VideoShareModel, 'Actor', MActorDefault> 13 Use<'Actor', MActorDefault>
10 14
11export type MVideoShareFull = MVideoShareActor & 15export type MVideoShareFull = MVideoShare &
12 PickWith<VideoShareModel, 'Video', MVideo> 16 Use<'Actor', MActorDefault> &
17 Use<'Video', MVideo>