public/shared/types.d.ts
2023-05-24 12:25:31 -04:00

29 lines
590 B
TypeScript

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[];
description?: string;
readingTime: ReadingTime;
nopreview?: boolean;
}
interface StoryParsedContent extends ParsedContent {
date: Date;
title: string;
tags: string[];
description?: string;
readingTime: ReadingTime;
nopreview?: boolean;
}
type AnyParsedContent = BlogParsedContent | StoryParsedContent;