From c2b4c5d144db17ebf2dc9de32ba25cc836831ae2 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 21 Dec 2019 21:15:59 +0100 Subject: viewer: Improved the Gallery type definitions. Basic display of the images and thumbnails example: "thumbnails" instead of "thumbs" --- viewer/src/@types/gallery/index.d.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery/index.d.ts b/viewer/src/@types/gallery/index.d.ts index 2dd11fb..b47c812 100644 --- a/viewer/src/@types/gallery/index.d.ts +++ b/viewer/src/@types/gallery/index.d.ts @@ -1,4 +1,10 @@ declare namespace Gallery { + interface Image extends Item { + properties: ImageProperties, + } + interface Directory extends Item { + properties: DirectoryProperties, + } interface Item { title: string, date: string, @@ -8,9 +14,9 @@ declare namespace Gallery { thumbnail: { path: string, }, - properties: Image | Directory, + properties: ImageProperties | DirectoryProperties, } - interface Image { + interface ImageProperties { type: "image", filesize: number, resolution: { @@ -18,7 +24,7 @@ declare namespace Gallery { height: number, } } - interface Directory { + interface DirectoryProperties { type: "directory", items: Item[] } -- cgit v1.2.3