1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-06-30 23:21:29 -04:00

organize types a bit more sanely & bump deps

This commit is contained in:
2022-02-24 07:06:34 -05:00
parent d24d29a04e
commit e6f1955efb
16 changed files with 267 additions and 645 deletions

34
types/index.d.ts vendored
View File

@ -1,32 +1,2 @@
import type { MDXRemoteSerializeResult } from "next-mdx-remote";
export type NoteMetaType = {
title: string;
htmlTitle: string;
date: string;
slug: string;
permalink: string;
description: string;
image?: string;
tags?: string[];
readingMins?: number;
noComments?: boolean;
};
export type NoteType = {
frontMatter: NoteMetaType;
source: MDXRemoteSerializeResult;
};
export type RepoType = {
name: string;
url: string;
description?: string;
language?: {
name: string;
color?: string;
};
stars?: number;
forks?: number;
updatedAt: string;
};
export * from "./note";
export * from "./repository";

19
types/note.d.ts vendored Normal file
View File

@ -0,0 +1,19 @@
import type { MDXRemoteSerializeResult } from "next-mdx-remote";
export type NoteType = {
frontMatter: {
slug: string;
permalink: string;
date: string;
title: string;
htmlTitle?: string;
description?: string;
image?: string;
tags?: string[];
readingMins?: number;
noComments?: boolean;
};
// the final, compiled JSX by next-mdx-remote; see lib/parse-notes.ts
source: MDXRemoteSerializeResult;
};

12
types/repository.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
export type RepositoryType = {
name: string;
url: string;
description?: string;
language?: {
name: string;
color?: string;
};
stars?: number;
forks?: number;
updatedAt: string;
};