⚙️ Improve `svg` types

This commit is contained in:
pheralb 2024-01-24 11:41:27 +00:00
parent dba9378833
commit 2392a92b77

View File

@ -1,23 +1,18 @@
import type { tCategory } from './categories'; import type { tCategory } from './categories';
type tCategoryPair = [tCategory, tCategory]; type CategoryPair = [tCategory, tCategory];
type CategoryTriple = [tCategory, tCategory, tCategory]; type CategoryTriple = [tCategory, tCategory, tCategory];
type ThemeOptions = {
dark: string;
light: string;
};
export interface iSVG { export interface iSVG {
id?: number; id?: number;
title: string; title: string;
category: tCategory | tCategoryPair | CategoryTriple; category: tCategory | CategoryPair | CategoryTriple;
route: route: string | ThemeOptions;
| string // for backwards compat of when theme support was not added wordmark?: string | ThemeOptions;
| {
dark: string;
light: string;
};
wordmark?:
| string // for backwards compat of when theme support was not added
| {
dark: string;
light: string;
};
url: string; url: string;
} }