Migrate more code to typescript
This commit is contained in:
37
src/types.ts
Normal file
37
src/types.ts
Normal file
@ -0,0 +1,37 @@
|
||||
export interface Post {
|
||||
id: string;
|
||||
slug: string;
|
||||
|
||||
publishDate: Date;
|
||||
title: string;
|
||||
description?: string;
|
||||
|
||||
image?: string;
|
||||
|
||||
canonical?: string | URL;
|
||||
permalink?: string;
|
||||
|
||||
draft?: boolean;
|
||||
|
||||
excerpt?: string;
|
||||
category?: string;
|
||||
tags?: Array<string>;
|
||||
authors?: Array<string>;
|
||||
|
||||
Content: unknown;
|
||||
content?: string;
|
||||
readingTime: number;
|
||||
}
|
||||
|
||||
export interface MetaSEO {
|
||||
title?: string,
|
||||
description?: string,
|
||||
image?: string,
|
||||
|
||||
canonical?: string,
|
||||
noindex?: boolean,
|
||||
nofollow?: boolean,
|
||||
|
||||
ogTitle?: string,
|
||||
ogType?: string,
|
||||
}
|
Reference in New Issue
Block a user