refactor: improve type safety (#155)

* Fix to make it type safe.

* The build is failing, fix it.
This commit is contained in:
Katsuyuki Karasawa
2024-08-28 01:19:26 +09:00
committed by GitHub
parent f79ee3482d
commit e9c8930559
10 changed files with 489 additions and 133 deletions

View File

@@ -1,4 +1,4 @@
import type { LIGHT_MODE, DARK_MODE, AUTO_MODE } from '@constants/constants'
import type { AUTO_MODE, DARK_MODE, LIGHT_MODE } from '@constants/constants'
export type SiteConfig = {
title: string
@@ -67,3 +67,18 @@ export type LIGHT_DARK_MODE =
| typeof LIGHT_MODE
| typeof DARK_MODE
| typeof AUTO_MODE
export type BlogPostData = {
body: string
title: string
published: Date
description: string
tags: string[]
draft?: boolean
image?: string
category?: string
prevTitle?: string
prevSlug?: string
nextTitle?: string
nextSlug?: string
}