From 2143cc955c1e071f7567a32984c254a005d523ff Mon Sep 17 00:00:00 2001 From: developomp Date: Wed, 5 Jan 2022 13:16:28 +0900 Subject: [PATCH] group similar types together --- source/types/typing.ts | 111 +++++++++++++++++++++++++---------------- 1 file changed, 68 insertions(+), 43 deletions(-) diff --git a/source/types/typing.ts b/source/types/typing.ts index 3b46a60..b9de561 100644 --- a/source/types/typing.ts +++ b/source/types/typing.ts @@ -1,39 +1,3 @@ -export enum ParseMode { - POSTS, - SERIES, - UNSEARCHABLE, -} - -export interface Base {} - -export interface PostData { - title: string - date: string - readTime: string - wordCount: number - tags?: string[] -} - -export interface Series { - title: string - date: string - readTime: string - wordCount: number - order: string[] - length: number - tags?: string[] -} - -export interface FetchedPage { - title: string - date: string - readTime: string - wordCount: number - tags: string[] - toc?: string - content: string -} - export interface Map { // key: YYYY-MM-DD // value: url @@ -65,14 +29,14 @@ export interface Map { unsearchable: { [key: string]: { title: string } } } -export interface SeriesEntry { - index: number - url: string -} +/** + * General + */ -export interface SeriesMap { - // key: url - [key: string]: SeriesEntry[] +export enum ParseMode { + POSTS, + SERIES, + UNSEARCHABLE, } export interface MarkdownData { @@ -81,3 +45,64 @@ export interface MarkdownData { title: string tags: string[] } + +export interface PostData { + title: string + date: string + readTime: string + wordCount: number + tags?: string[] +} + +export interface FetchedPage { + title: string + date: string + readTime: string + wordCount: number + tags: string[] + toc?: string + content: string +} + +/** + * Series + */ + +export interface Series { + title: string + date: string + readTime: string + wordCount: number + order: string[] + length: number + tags?: string[] +} + +export interface SeriesMap { + // key: url + [key: string]: SeriesEntry[] +} + +export interface SeriesEntry { + index: number + url: string +} + +/** + * Portfolio + */ + +export interface PortfolioData { + overview: string + projects: PortfolioProject[] +} + +export interface PortfolioOverview { + // link to my github + github: string + description: string +} + +export interface PortfolioProject { + name: string +}