From 6cd7a9b774d28d5d478b203560297c332c9d2f0b Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 30 Aug 2023 17:17:21 -0700 Subject: fix(mangadex): add types --- src/routes/mangadex/manga/+server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/routes') diff --git a/src/routes/mangadex/manga/+server.ts b/src/routes/mangadex/manga/+server.ts index 8c25163f..5bfa1882 100644 --- a/src/routes/mangadex/manga/+server.ts +++ b/src/routes/mangadex/manga/+server.ts @@ -1,6 +1,6 @@ export const GET = async ({ url }) => { - const nullIfNullString = (s) => (s === 'null' ? null : s); - const get = async (title) => { + const nullIfNullString = (s: string | null) => (s == 'null' ? null : s); + const get = async (title: string) => { return await ( await fetch( `https://api.mangadex.org/manga?title=${encodeURIComponent( -- cgit v1.2.3