chore: fix most explicit-function-return-type warnings #656

Merged
Sainan merged 4 commits from explicit-return-types into main 2024-12-29 12:47:18 -08:00
Showing only changes of commit ccda64e8b8 - Show all commits

View File

@ -4,7 +4,7 @@ import { getRecipe } from "@/src/services/itemDataService";
import { logger } from "@/src/utils/logger"; import { logger } from "@/src/utils/logger";
import { Types } from "mongoose"; import { Types } from "mongoose";
export const startRecipe = async (recipeName: string, accountId: string): Promise<{ RecipeId: { $oid?: string } }> => { export const startRecipe = async (recipeName: string, accountId: string): Promise<{ RecipeId: { $oid: string } }> => {
const recipe = getRecipe(recipeName); const recipe = getRecipe(recipeName);
if (!recipe) { if (!recipe) {
@ -34,6 +34,6 @@ export const startRecipe = async (recipeName: string, accountId: string): Promis
const newInventory = await inventory.save(); const newInventory = await inventory.save();
return { return {
RecipeId: { $oid: newInventory.PendingRecipes[newInventory.PendingRecipes.length - 1]._id?.toString() } RecipeId: { $oid: newInventory.PendingRecipes[newInventory.PendingRecipes.length - 1]._id.toString() }
}; };
}; };