Improved handling of null values when entering tags frontmatter
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { NonEmptyArray } from "./utils.type";
|
||||
|
||||
export type TFrontmatter = {
|
||||
title: string;
|
||||
time: string;
|
||||
tags: string[] | null;
|
||||
tags: NonEmptyArray<string> | null;
|
||||
subtitle: string | null;
|
||||
summary: string | null;
|
||||
coverURL: string | null;
|
||||
|
||||
1
types/utils.type.ts
Normal file
1
types/utils.type.ts
Normal file
@@ -0,0 +1 @@
|
||||
export type NonEmptyArray<T> = [T, ...T[]];
|
||||
Reference in New Issue
Block a user