Add specific type for changelog

pull/82/head
MillenniumEarl 2021-03-22 14:18:39 +01:00
parent a72462becb
commit 2acf769970
6 changed files with 33 additions and 11 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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.
*/