chore: enable noUncheckedIndexedAccess, better type check (#2608)

This commit is contained in:
Stephen Zhou
2025-01-18 22:35:23 +08:00
committed by GitHub
parent f947bd1d1e
commit 2cd1b5daf9
182 changed files with 489 additions and 589 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ export const getTokenFromCookie = (cookie: string) => {
.reduce(
(acc, item) => {
const [key, value] = item.split("=")
acc[key] = value
acc[key!] = value!
return acc
},
{} as Record<string, string>,
+3 -3
View File
@@ -21,16 +21,16 @@ export const ogRoute = (app: FastifyInstance) => {
switch (type) {
case "feed": {
imageRes = await renderFeedOG(apiClient, id).catch(errorFallback)
imageRes = await renderFeedOG(apiClient, id!).catch(errorFallback)
break
}
case "user": {
imageRes = await renderUserOG(apiClient, id).catch(errorFallback)
imageRes = await renderUserOG(apiClient, id!).catch(errorFallback)
break
}
case "list": {
imageRes = await renderListOG(apiClient, id).catch(errorFallback)
imageRes = await renderListOG(apiClient, id!).catch(errorFallback)
break
}
default: {