Replace internal type with external Frontmatter type

This commit is contained in:
Sat Naing
2022-09-11 14:05:17 +06:30
parent c6c4927638
commit 15a0bd04c3
+1 -10
View File
@@ -1,14 +1,5 @@
import type { MarkdownInstance } from "astro"; import type { MarkdownInstance } from "astro";
import type { Frontmatter } from "./types";
interface Frontmatter {
title: string;
description: string;
author: string;
datetime: string;
slug: string;
featured: boolean;
tags: string[];
}
const getSortedPosts = (posts: MarkdownInstance<Frontmatter>[]) => const getSortedPosts = (posts: MarkdownInstance<Frontmatter>[]) =>
posts.sort( posts.sort(