diff options
Diffstat (limited to 'src/ts')
| -rw-r--r-- | src/ts/types/app.ts | 5 | ||||
| -rw-r--r-- | src/ts/types/mdx.ts | 5 | ||||
| -rw-r--r-- | src/ts/types/raw-data.ts | 3 |
3 files changed, 4 insertions, 9 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> = { diff --git a/src/ts/types/mdx.ts b/src/ts/types/mdx.ts index 6b72f21..16538c1 100644 --- a/src/ts/types/mdx.ts +++ b/src/ts/types/mdx.ts @@ -11,10 +11,7 @@ export type MDXPageMeta = Pick<Meta<'page'>, 'cover' | 'dates' | 'seo'> & { title: string; }; -export type MDXProjectMeta = Omit< - Meta<'project'>, - 'readingTime' | 'wordsCount' -> & { +export type MDXProjectMeta = Exclude<Meta<'project'>, 'wordsCount'> & { intro: string; title: string; }; diff --git a/src/ts/types/raw-data.ts b/src/ts/types/raw-data.ts index ba6d596..dc3db90 100644 --- a/src/ts/types/raw-data.ts +++ b/src/ts/types/raw-data.ts @@ -25,7 +25,6 @@ export type ContentParts = { }; export type Info = { - readingTime: number; wordsCount: number; }; @@ -66,7 +65,7 @@ export type RawArticlePreview = Pick< >; export type RawPage = { - author: NodeResponse<RawAuthor<'page'>>; + author?: NodeResponse<RawAuthor<'page'>>; contentParts: ContentParts; databaseId: number; date: string; |
