aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts/types/app.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-23 14:07:02 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-23 16:00:13 +0200
commit34e216546151eaf8a0a3cbb0bc8b65dae4c63bf2 (patch)
treebff34f8a1dc65f0559ddf851433f242edb092824 /src/ts/types/app.ts
parent0f8f963ba3eccd7fd94785bf7fb216b6287cec57 (diff)
refactor: reduce the number of data transformation
Diffstat (limited to 'src/ts/types/app.ts')
-rw-r--r--src/ts/types/app.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ts/types/app.ts b/src/ts/types/app.ts
index feff5a5..cb5429b 100644
--- a/src/ts/types/app.ts
+++ b/src/ts/types/app.ts
@@ -44,7 +44,7 @@ export type Comment = {
content: string;
id: number;
meta: CommentMeta;
- parentId: number;
+ parentId?: number;
replies: Comment[];
};
@@ -80,7 +80,6 @@ export type Meta<T extends PageKind> = {
cover?: Image;
dates: Dates;
license?: T extends 'project' ? string : never;
- readingTime?: number;
repos?: T extends 'project' ? Repos : never;
seo: SEO;
tagline?: T extends 'project' ? string : never;
@@ -88,7 +87,7 @@ export type Meta<T extends PageKind> = {
thematics?: T extends 'article' | 'topic' ? PageLink[] : never;
topics?: T extends 'article' | 'thematic' ? PageLink[] : never;
website?: T extends 'topic' ? string : never;
- wordsCount?: number;
+ wordsCount: number;
};
export type Page<T extends PageKind> = {