aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/@types
diff options
context:
space:
mode:
authorpacien2020-05-19 21:06:16 +0200
committerNotkea2020-05-22 01:02:18 +0200
commit516ee7c5599f2c90a636fd9301806bef67830046 (patch)
tree50cc7369f8a0edf6160dfe5aca8e5bf4676fde42 /viewer/src/@types
parenta2e06f0a217b12d92cecdad77c20de88037f9912 (diff)
downloadldgallery-516ee7c5599f2c90a636fd9301806bef67830046.tar.gz
compiler: add audio and video extensions
Diffstat (limited to 'viewer/src/@types')
-rw-r--r--viewer/src/@types/gallery.d.ts24
1 files changed, 22 insertions, 2 deletions
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 {
43 interface PDF extends Item { 43 interface PDF extends Item {
44 properties: PDFProperties, 44 properties: PDFProperties,
45 } 45 }
46 interface Video extends Item {
47 properties: VideoProperties,
48 }
49 interface Audio extends Item {
50 properties: AudioProperties,
51 }
46 interface Directory extends Item { 52 interface Directory extends Item {
47 properties: DirectoryProperties, 53 properties: DirectoryProperties,
48 } 54 }
@@ -53,7 +59,13 @@ declare namespace Gallery {
53 tags: RawTag[], 59 tags: RawTag[],
54 path: string, 60 path: string,
55 thumbnail?: Thumbnail 61 thumbnail?: Thumbnail
56 properties: OtherProperties | PictureProperties | PlainTextProperties | PDFProperties | DirectoryProperties, 62 properties: OtherProperties
63 | PictureProperties
64 | PlainTextProperties
65 | PDFProperties
66 | VideoProperties
67 | AudioProperties
68 | DirectoryProperties,
57 } 69 }
58 interface Resolution { 70 interface Resolution {
59 width: number, 71 width: number,
@@ -76,6 +88,14 @@ declare namespace Gallery {
76 type: "pdf", 88 type: "pdf",
77 resource: string, 89 resource: string,
78 } 90 }
91 interface VideoProperties {
92 type: "video",
93 resource: string,
94 }
95 interface AudioProperties {
96 type: "audio",
97 resource: string,
98 }
79 interface DirectoryProperties { 99 interface DirectoryProperties {
80 type: "directory", 100 type: "directory",
81 items: Item[] 101 items: Item[]
@@ -85,5 +105,5 @@ declare namespace Gallery {
85 resolution: Resolution 105 resolution: Resolution
86 } 106 }
87 type RawTag = string; 107 type RawTag = string;
88 type ItemType = "other" | "picture" | "plaintext" | "pdf" | "directory"; 108 type ItemType = "other" | "picture" | "plaintext" | "pdf" | "video" | "audio" | "directory";
89} 109}