From 08282e07f048c7a187842b6f4311481c59356a54 Mon Sep 17 00:00:00 2001 From: Neshura Date: Tue, 2 Jan 2024 02:08:43 +0100 Subject: [PATCH] Add IconType enum, make Service fields readonly --- src/lib/types/data-types.ts | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/lib/types/data-types.ts b/src/lib/types/data-types.ts index 12eb51e..bcdb283 100644 --- a/src/lib/types/data-types.ts +++ b/src/lib/types/data-types.ts @@ -1,9 +1,18 @@ export type Service = { - name: string; - icon: string; - href: string; - desc: string; - warn: string; - extLink?: string; - id: number; + readonly name: string; + readonly icon: string; + readonly iconType: IconType; + readonly href: string; + readonly desc: string; + readonly warn: string; + readonly extLink?: string; + readonly id: number; }; + +export enum IconType { + SVG = "svg", + AVIF = "avif", + PNG = "png", + WEBP = "webp", + JPG = "jpg", +} \ No newline at end of file