From 2acf7699700462a958c19358b8fe11e36c0f58a2 Mon Sep 17 00:00:00 2001 From: MillenniumEarl Date: Mon, 22 Mar 2021 14:18:39 +0100 Subject: [PATCH] Add specific type for changelog --- src/scripts/classes/handiwork/animation.ts | 4 ++-- src/scripts/classes/handiwork/asset.ts | 4 ++-- src/scripts/classes/handiwork/comic.ts | 4 ++-- src/scripts/classes/handiwork/game.ts | 4 ++-- src/scripts/classes/handiwork/handiwork.ts | 12 ++++++++++-- src/scripts/interfaces.ts | 16 +++++++++++++++- 6 files changed, 33 insertions(+), 11 deletions(-) diff --git a/src/scripts/classes/handiwork/animation.ts b/src/scripts/classes/handiwork/animation.ts index d097cc8..65c8447 100644 --- a/src/scripts/classes/handiwork/animation.ts +++ b/src/scripts/classes/handiwork/animation.ts @@ -6,7 +6,7 @@ "use strict"; // Modules from files -import { TAuthor, IAnimation, TRating, TCategory } from "../../interfaces"; +import { TAuthor, IAnimation, TRating, TCategory, TChangelog } from "../../interfaces"; export default class Animation implements IAnimation { //#region Properties @@ -19,7 +19,7 @@ export default class Animation implements IAnimation { resolution: string[]; authors: TAuthor[]; category: TCategory; - changelog: string[]; + changelog: TChangelog[]; cover: string; id: number; lastThreadUpdate: Date; diff --git a/src/scripts/classes/handiwork/asset.ts b/src/scripts/classes/handiwork/asset.ts index b18a9e5..5a434be 100644 --- a/src/scripts/classes/handiwork/asset.ts +++ b/src/scripts/classes/handiwork/asset.ts @@ -6,7 +6,7 @@ "use strict"; // Modules from files -import { TAuthor, IAsset, TRating, TCategory } from "../../interfaces"; +import { TAuthor, IAsset, TRating, TCategory, TChangelog } from "../../interfaces"; export default class Asset implements IAsset { //#region Properties @@ -18,7 +18,7 @@ export default class Asset implements IAsset { sku: string; authors: TAuthor[]; category: TCategory; - changelog: string[]; + changelog: TChangelog[]; cover: string; id: number; lastThreadUpdate: Date; diff --git a/src/scripts/classes/handiwork/comic.ts b/src/scripts/classes/handiwork/comic.ts index 6bf713a..ff5b795 100644 --- a/src/scripts/classes/handiwork/comic.ts +++ b/src/scripts/classes/handiwork/comic.ts @@ -6,7 +6,7 @@ "use strict"; // Modules from files -import { TAuthor, IComic, TRating, TCategory } from "../../interfaces"; +import { TAuthor, IComic, TRating, TCategory, TChangelog } from "../../interfaces"; export default class Comic implements IComic { //#region Properties @@ -15,7 +15,7 @@ export default class Comic implements IComic { resolution: string[]; authors: TAuthor[]; category: TCategory; - changelog: string[]; + changelog: TChangelog[]; cover: string; id: number; lastThreadUpdate: Date; diff --git a/src/scripts/classes/handiwork/game.ts b/src/scripts/classes/handiwork/game.ts index d422668..80a71d5 100644 --- a/src/scripts/classes/handiwork/game.ts +++ b/src/scripts/classes/handiwork/game.ts @@ -6,7 +6,7 @@ "use strict"; // Modules from files -import { TAuthor, TEngine, IGame, TRating, TStatus, TCategory } from "../../interfaces"; +import { TAuthor, TEngine, IGame, TRating, TStatus, TCategory, TChangelog } from "../../interfaces"; export default class Game implements IGame { //#region Properties @@ -22,7 +22,7 @@ export default class Game implements IGame { version: string; authors: TAuthor[]; category: TCategory; - changelog: string[]; + changelog: TChangelog[]; cover: string; id: number; lastThreadUpdate: Date; diff --git a/src/scripts/classes/handiwork/handiwork.ts b/src/scripts/classes/handiwork/handiwork.ts index cb68d27..c558c1a 100644 --- a/src/scripts/classes/handiwork/handiwork.ts +++ b/src/scripts/classes/handiwork/handiwork.ts @@ -6,7 +6,15 @@ "use strict"; // Modules from files -import { TAuthor, TRating, IHandiwork, TEngine, TCategory, TStatus } from "../../interfaces"; +import { + TAuthor, + TRating, + IHandiwork, + TEngine, + TCategory, + TStatus, + TChangelog +} from "../../interfaces"; /** * It represents a generic work, be it a game, a comic, an animation or an asset. @@ -25,7 +33,7 @@ export default class HandiWork implements IHandiwork { version: string; authors: TAuthor[]; category: TCategory; - changelog: string[]; + changelog: TChangelog[]; cover: string; id: number; lastThreadUpdate: Date; diff --git a/src/scripts/interfaces.ts b/src/scripts/interfaces.ts index 33916e6..64b1bae 100644 --- a/src/scripts/interfaces.ts +++ b/src/scripts/interfaces.ts @@ -51,6 +51,20 @@ export type TRating = { count: number; }; +/** + * Information about a single version of the product. + */ +export type TChangelog = { + /** + * Product version. + */ + version: string; + /** + * Version information. + */ + information: string[]; +}; + /** * List of possible graphics engines used for game development. */ @@ -101,7 +115,7 @@ export interface IBasic { /** * List of changes of the work for each version. */ - changelog: string[]; + changelog: TChangelog[]; /** * link to the cover image of the work. */