From 516ee7c5599f2c90a636fd9301806bef67830046 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 19 May 2020 21:06:16 +0200 Subject: compiler: add audio and video extensions --- viewer/src/@types/gallery.d.ts | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'viewer/src') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 7345ef9..2407f98 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -43,6 +43,12 @@ declare namespace Gallery { interface PDF extends Item { properties: PDFProperties, } + interface Video extends Item { + properties: VideoProperties, + } + interface Audio extends Item { + properties: AudioProperties, + } interface Directory extends Item { properties: DirectoryProperties, } @@ -53,7 +59,13 @@ declare namespace Gallery { tags: RawTag[], path: string, thumbnail?: Thumbnail - properties: OtherProperties | PictureProperties | PlainTextProperties | PDFProperties | DirectoryProperties, + properties: OtherProperties + | PictureProperties + | PlainTextProperties + | PDFProperties + | VideoProperties + | AudioProperties + | DirectoryProperties, } interface Resolution { width: number, @@ -76,6 +88,14 @@ declare namespace Gallery { type: "pdf", resource: string, } + interface VideoProperties { + type: "video", + resource: string, + } + interface AudioProperties { + type: "audio", + resource: string, + } interface DirectoryProperties { type: "directory", items: Item[] @@ -85,5 +105,5 @@ declare namespace Gallery { resolution: Resolution } type RawTag = string; - type ItemType = "other" | "picture" | "plaintext" | "pdf" | "directory"; + type ItemType = "other" | "picture" | "plaintext" | "pdf" | "video" | "audio" | "directory"; } -- cgit v1.2.3