Typing
This commit is contained in:
parent
81d4fe7b7f
commit
b07829e6e8
@ -1,9 +1,9 @@
|
|||||||
export type ContentList = (Project|Diary)[];
|
export type ContentList = (Project | Diary)[];
|
||||||
|
|
||||||
export type ContentType = "project" | "diary";
|
export type ContentType = "project" | "diary";
|
||||||
|
|
||||||
export interface Project {
|
interface Content {
|
||||||
type: "project";
|
type: "project" | "diary";
|
||||||
name: string;
|
name: string;
|
||||||
desc: string[];
|
desc: string[];
|
||||||
short_desc: string;
|
short_desc: string;
|
||||||
@ -11,13 +11,12 @@ export interface Project {
|
|||||||
repo?: string;
|
repo?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Diary {
|
export interface Project extends Content {
|
||||||
|
type: "project";
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Diary extends Content {
|
||||||
type: "diary";
|
type: "diary";
|
||||||
name: string;
|
|
||||||
desc: string[];
|
|
||||||
short_desc: string;
|
|
||||||
more?: string;
|
|
||||||
repo?: string;
|
|
||||||
entries: {
|
entries: {
|
||||||
title: string;
|
title: string;
|
||||||
filename: string;
|
filename: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user