]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/types/models/video/thumbnail.ts
Generate a name for thumbnails
[github/Chocobozzz/PeerTube.git] / server / types / models / video / thumbnail.ts
index c03ba55ac61b6eb439d8c22688c0347df0911031..81a29e062abc47078e7768308d0c122f4bf448b8 100644 (file)
@@ -1,3 +1,15 @@
+import { PickWith } from '@shared/core-utils'
 import { ThumbnailModel } from '../../../models/video/thumbnail'
+import { MVideo } from './video'
+
+type Use<K extends keyof ThumbnailModel, M> = PickWith<ThumbnailModel, K, M>
+
+// ############################################################################
 
 export type MThumbnail = Omit<ThumbnailModel, 'Video' | 'VideoPlaylist'>
+
+// ############################################################################
+
+export type MThumbnailVideo =
+  MThumbnail &
+  Use<'Video', MVideo>