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-change-ownership.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-change-ownership.ts')
-rw-r--r-- | server/typings/models/video/video-change-ownership.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/server/typings/models/video/video-change-ownership.ts b/server/typings/models/video/video-change-ownership.ts index 718515e2d..0410115c6 100644 --- a/server/typings/models/video/video-change-ownership.ts +++ b/server/typings/models/video/video-change-ownership.ts | |||
@@ -2,9 +2,13 @@ import { VideoChangeOwnershipModel } from '@server/models/video/video-change-own | |||
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith } from '@server/typings/utils' |
3 | import { MAccountDefault, MVideoWithFileThumbnail } from '@server/typings/models' | 3 | import { MAccountDefault, MVideoWithFileThumbnail } from '@server/typings/models' |
4 | 4 | ||
5 | type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M> | ||
6 | |||
7 | // ############################################################################ | ||
8 | |||
5 | export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'> | 9 | export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'> |
6 | 10 | ||
7 | export type MVideoChangeOwnershipFull = MVideoChangeOwnership & | 11 | export type MVideoChangeOwnershipFull = MVideoChangeOwnership & |
8 | PickWith<VideoChangeOwnershipModel, 'Initiator', MAccountDefault> & | 12 | Use<'Initiator', MAccountDefault> & |
9 | PickWith<VideoChangeOwnershipModel, 'NextOwner', MAccountDefault> & | 13 | Use<'NextOwner', MAccountDefault> & |
10 | PickWith<VideoChangeOwnershipModel, 'Video', MVideoWithFileThumbnail> | 14 | Use<'Video', MVideoWithFileThumbnail> |