diff options
author | zeroinformatique | 2021-07-03 00:48:53 +0200 |
---|---|---|
committer | GitHub | 2021-07-03 00:48:53 +0200 |
commit | b6605e2c4ee73ac8b994624098344db5e44ac07d (patch) | |
tree | 5ed06cc5ecdabe070f6fdb9bc4f9a8a3b435cbe6 /viewer/src/@types/tag.d.ts | |
parent | 08ac32103fb5f8cca1861267dfd07a7c0d2faf62 (diff) | |
parent | 1f0377c1b4c2959c73fe4e368673f057ef369917 (diff) | |
download | ldgallery-b6605e2c4ee73ac8b994624098344db5e44ac07d.tar.gz |
Merge pull request #302 from ldgallery/oz-types-normalization
viewer: types normalization
Diffstat (limited to 'viewer/src/@types/tag.d.ts')
-rw-r--r-- | viewer/src/@types/tag.d.ts | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/viewer/src/@types/tag.d.ts b/viewer/src/@types/tag.d.ts index 59ae779..9ed2c04 100644 --- a/viewer/src/@types/tag.d.ts +++ b/viewer/src/@types/tag.d.ts | |||
@@ -17,25 +17,25 @@ | |||
17 | -- along with this program. If not, see <https://www.gnu.org/licenses/>. | 17 | -- along with this program. If not, see <https://www.gnu.org/licenses/>. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | declare namespace Tag { | 20 | import { Item, RawTag } from "./gallery"; |
21 | interface Node { | ||
22 | tag: Gallery.RawTag; | ||
23 | tagfiltered: Gallery.RawTag; | ||
24 | rootPart: boolean; | ||
25 | childPart: boolean; | ||
26 | items: Gallery.Item[]; | ||
27 | children: Index; | ||
28 | } | ||
29 | interface Search extends Node { | ||
30 | parent?: Node; | ||
31 | operation: string; // Enum Operation | ||
32 | display: string; | ||
33 | } | ||
34 | type SearchByOperation = Record<string, Tag.Search[]>; | ||
35 | type Index = Record<string, Node>; | ||
36 | 21 | ||
37 | interface Category { | 22 | export interface TagNode { |
38 | tag: string; | 23 | tag: RawTag; |
39 | index: Index; | 24 | tagfiltered: RawTag; |
40 | } | 25 | rootPart: boolean; |
26 | childPart: boolean; | ||
27 | items: Item[]; | ||
28 | children: TagIndex; | ||
29 | } | ||
30 | export interface TagSearch extends TagNode { | ||
31 | parent?: TagNode; | ||
32 | operation: string; // Enum Operation | ||
33 | display: string; | ||
34 | } | ||
35 | export type TagSearchByOperation = Record<string, TagSearch[]>; | ||
36 | export type TagIndex = Record<string, TagNode>; | ||
37 | |||
38 | export interface TagCategory { | ||
39 | tag: string; | ||
40 | index: TagIndex; | ||
41 | } | 41 | } |