mirror of
https://github.com/netlight/my-finance-pal-backend.git
synced 2024-11-10 00:51:56 +01:00
Add explicit type for CreateBudgetUseCase
This commit is contained in:
parent
600c8d4051
commit
ea7dc7a6d2
1 changed files with 4 additions and 2 deletions
|
@ -4,9 +4,11 @@ import type BudgetRepository from "../../repository/budget/budgetRepository";
|
|||
import { type Budget, type BudgetSummary } from "../../domain/budget";
|
||||
import UUID from "../../domain/uuid";
|
||||
|
||||
export const createBudget: (
|
||||
type CreateBudgetUseCase = (
|
||||
insertBudgetSummary: BudgetSummaryRepository["insert"],
|
||||
) => BudgetUseCases["createBudget"] =
|
||||
) => BudgetUseCases["createBudget"];
|
||||
|
||||
export const createBudget: CreateBudgetUseCase =
|
||||
(insertBudgetSummary) => async (newBudget) => {
|
||||
// We could also create a class for our domain objects and put functionalities s.a.
|
||||
// Budget.createFrom(newBudget) and BudgetSummary.getBudget() there
|
||||
|
|
Loading…
Reference in a new issue