Skip to content

Commit

Permalink
[Typescript] Update validateBudgetName and uniqueBudgetName return ty…
Browse files Browse the repository at this point in the history
…pes (#4208)

* Update validateBudgetName and uniqueBudgetName per coderabbit review

* Release notes
  • Loading branch information
joel-jeremy authored Jan 21, 2025
1 parent 4850034 commit 1442662
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/loot-core/src/client/actions/budgets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,14 @@ export function createBudget({ testMode = false, demoMode = false } = {}) {
};
}

export function validateBudgetName(name: string) {
export async function validateBudgetName(name: string): Promise<{
valid: boolean;
message?: string;
}> {
return send('validate-budget-name', { name });
}

export function uniqueBudgetName(name: string) {
export async function uniqueBudgetName(name: string): Promise<string> {
return send('unique-budget-name', { name });
}

Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/4208.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [joel-jeremy]
---

[Typescript] Update validateBudgetName and uniqueBudgetName return types

0 comments on commit 1442662

Please sign in to comment.