aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/@types/gallery.d.ts
diff options
context:
space:
mode:
authorZero~Informatique2020-05-22 04:14:48 +0200
committerOzoneGrif2020-05-22 04:39:18 +0200
commit74c1c5e34787ac57299c8cbd874e9dcc56da406d (patch)
tree51da8090667290bc27e3580b9a78271ddf4d0e3a /viewer/src/@types/gallery.d.ts
parente20f99b74b55fdb3edbcfe5bfdb700fc1a5e9574 (diff)
downloadldgallery-74c1c5e34787ac57299c8cbd874e9dcc56da406d.tar.gz
viewer: Enumerated item types
Diffstat (limited to 'viewer/src/@types/gallery.d.ts')
-rw-r--r--viewer/src/@types/gallery.d.ts27
1 files changed, 13 insertions, 14 deletions
diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts
index 2407f98..151ae92 100644
--- a/viewer/src/@types/gallery.d.ts
+++ b/viewer/src/@types/gallery.d.ts
@@ -60,44 +60,44 @@ declare namespace Gallery {
60 path: string, 60 path: string,
61 thumbnail?: Thumbnail 61 thumbnail?: Thumbnail
62 properties: OtherProperties 62 properties: OtherProperties
63 | PictureProperties 63 | PictureProperties
64 | PlainTextProperties 64 | PlainTextProperties
65 | PDFProperties 65 | PDFProperties
66 | VideoProperties 66 | VideoProperties
67 | AudioProperties 67 | AudioProperties
68 | DirectoryProperties, 68 | DirectoryProperties,
69 } 69 }
70 interface Resolution { 70 interface Resolution {
71 width: number, 71 width: number,
72 height: number, 72 height: number,
73 } 73 }
74 interface OtherProperties { 74 interface OtherProperties {
75 type: "other", 75 type: import("./ItemType").ItemType.OTHER,
76 resource: string 76 resource: string
77 } 77 }
78 interface PictureProperties { 78 interface PictureProperties {
79 type: "picture", 79 type: import("./ItemType").ItemType.PICTURE,
80 resource: string, 80 resource: string,
81 resolution: Resolution 81 resolution: Resolution
82 } 82 }
83 interface PlainTextProperties { 83 interface PlainTextProperties {
84 type: "plaintext", 84 type: import("./ItemType").ItemType.PLAINTEXT,
85 resource: string, 85 resource: string,
86 } 86 }
87 interface PDFProperties { 87 interface PDFProperties {
88 type: "pdf", 88 type: import("./ItemType").ItemType.PDF,
89 resource: string, 89 resource: string,
90 } 90 }
91 interface VideoProperties { 91 interface VideoProperties {
92 type: "video", 92 type: import("./ItemType").ItemType.VIDEO,
93 resource: string, 93 resource: string,
94 } 94 }
95 interface AudioProperties { 95 interface AudioProperties {
96 type: "audio", 96 type: import("./ItemType").ItemType.AUDIO,
97 resource: string, 97 resource: string,
98 } 98 }
99 interface DirectoryProperties { 99 interface DirectoryProperties {
100 type: "directory", 100 type: import("./ItemType").ItemType.DIRECTORY,
101 items: Item[] 101 items: Item[]
102 } 102 }
103 interface Thumbnail { 103 interface Thumbnail {
@@ -105,5 +105,4 @@ declare namespace Gallery {
105 resolution: Resolution 105 resolution: Resolution
106 } 106 }
107 type RawTag = string; 107 type RawTag = string;
108 type ItemType = "other" | "picture" | "plaintext" | "pdf" | "video" | "audio" | "directory";
109} 108}