From d60ba03406390eeb2b33e467ccbc2f8aa38d8419 Mon Sep 17 00:00:00 2001 From: barrientosvctor Date: Thu, 13 Jun 2024 17:50:44 -0500 Subject: [PATCH] feat(manga-types)!: add base inherited interface to IMangaVolume BREAKING CHANGE: Now, MangaVolume has been inherited from the base BaseChapter class. --- src/types/manga.ts | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/types/manga.ts b/src/types/manga.ts index 75d8be8..d440572 100644 --- a/src/types/manga.ts +++ b/src/types/manga.ts @@ -38,7 +38,7 @@ export interface IMangaChapter extends IBaseChapter { * * @author Zukaritasu */ -export interface IMangaVolume { +export interface IMangaVolume extends IBaseChapter { /** Manga volume ID */ id: number | string; /** @@ -46,24 +46,14 @@ export interface IMangaVolume { * the number of the first chapter of the volume is the beginning and * the last chapter is the end. */ range: [number, number]; - /** - * The title of the volume. The title may contain a short explanation - * of what the volume contains. */ - title?: string; /** * Description or introduction that explains a little of what is to * come in the next chapters that make up the volume. */ - description?: string; - /** Manga volume number */ - number?: number; //number + synopsis?: string; /** Images of the manga volume. */ images: string[]; /** The date on which the first chapter of the volume was published. */ date?: ICalendar; - /** - * The image or cover of the volume. - * This property contains the URL of the image */ - thumbnail?: string; /** URL of the volume in the API location */ url?: `/manga/${string}/volume/${string}`; // title or number } @@ -176,23 +166,17 @@ export class MangaChapter extends BaseChapter implements IMangaChapter { * * @author Zukaritasu */ -export class MangaVolume implements IMangaVolume { +export class MangaVolume extends BaseChapter implements IMangaVolume { /** @inheritdoc */ id: number | string; /** @inheritdoc */ range: [number, number] = [0, 0]; /** @inheritdoc */ - title?: string; - /** @inheritdoc */ - description?: string; - /** @inheritdoc */ - number?: number; //number + synopsis?: string; /** @inheritdoc */ images: string[]; /** @inheritdoc */ date?: ICalendar; /** @inheritdoc */ - thumbnail?: string; - /** @inheritdoc */ url?: `/manga/${string}/volume/${string}`; // title or number }