mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-01-14 10:42:56 -05:00
clean up strict types a bit more
This commit is contained in:
@@ -134,7 +134,7 @@ export const articleJsonLd: Pick<ArticleJsonLdProps, "authorName" | "publisherNa
|
||||
};
|
||||
|
||||
// Re-export icons to use their static image data elsewhere
|
||||
export const favicons: { [key: string]: StaticImageData } = {
|
||||
export const favicons: Record<string, StaticImageData> = {
|
||||
faviconIco,
|
||||
faviconPng,
|
||||
appleTouchIconPng,
|
||||
|
||||
@@ -16,7 +16,7 @@ export type BuildFeedOptions = {
|
||||
export const buildFeed = async (
|
||||
context: GetServerSidePropsContext<ParsedUrlQuery, PreviewData>,
|
||||
options: BuildFeedOptions
|
||||
): Promise<{ props: { [key: string]: unknown } }> => {
|
||||
): Promise<{ props: Record<string, unknown> }> => {
|
||||
const { res } = context;
|
||||
|
||||
// https://github.com/jpmonette/feed#example
|
||||
|
||||
@@ -9,10 +9,10 @@ import remarkUnwrapImages from "remark-unwrap-images";
|
||||
import rehypeSlug from "rehype-slug";
|
||||
import rehypePrism from "rehype-prism-plus";
|
||||
|
||||
import type { Note } from "../../types";
|
||||
import type { NoteWithSource } from "../../types";
|
||||
|
||||
// fully parses MDX into JS and returns *everything* about a note
|
||||
export const compileNote = async (slug: string): Promise<Note> => {
|
||||
export const compileNote = async (slug: string): Promise<NoteWithSource> => {
|
||||
const { frontMatter, content } = await getNoteData(slug);
|
||||
const source = await serialize(content, {
|
||||
parseFrontmatter: false,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type * as Stitches from "@stitches/react";
|
||||
|
||||
const normalizeStyles: { [key: string]: Stitches.CSSProperties } = {
|
||||
const normalizeStyles: Record<string, Stitches.CSSProperties> = {
|
||||
"*, ::before, ::after": {
|
||||
boxSizing: "border-box",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user