public/shared/types.d.ts

29 lines
590 B
TypeScript
Raw Permalink Normal View History

import type { ParsedContent } from "@nuxt/content/dist/runtime/types";
interface ReadingTime {
text: string;
minutes: number;
time: number;
words: number;
}
interface BlogParsedContent extends ParsedContent {
date: Date;
title: string;
tags: string[];
2022-08-10 13:14:48 -04:00
description?: string;
readingTime: ReadingTime;
nopreview?: boolean;
}
interface StoryParsedContent extends ParsedContent {
date: Date;
title: string;
tags: string[];
2022-08-10 13:14:48 -04:00
description?: string;
readingTime: ReadingTime;
nopreview?: boolean;
}
2023-05-24 12:25:31 -04:00
type AnyParsedContent = BlogParsedContent | StoryParsedContent;