Fix: Add async/Promise type annotations to budget name validation functions #1782

Closed
opened 2026-02-28 19:54:29 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @coderabbitai[bot] on GitHub (Jan 20, 2025).

Originally assigned to: @joel-jeremy on GitHub.

Description

The following functions in packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx need type adjustments to properly reflect their asynchronous nature:

  1. uniqueBudgetName: Should be marked as async and return Promise<string>
  2. validateBudgetName: Should be marked as async and return Promise<{ valid: boolean; message?: string; }>

Both functions use the asynchronous send function but currently don't reflect this in their type signatures.

Context

Originally created by @coderabbitai[bot] on GitHub (Jan 20, 2025). Originally assigned to: @joel-jeremy on GitHub. ## Description The following functions in `packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx` need type adjustments to properly reflect their asynchronous nature: 1. `uniqueBudgetName`: Should be marked as `async` and return `Promise<string>` 2. `validateBudgetName`: Should be marked as `async` and return `Promise<{ valid: boolean; message?: string; }>` Both functions use the asynchronous `send` function but currently don't reflect this in their type signatures. ## Context - PR: https://github.com/actualbudget/actual/pull/4114 - Comment: https://github.com/actualbudget/actual/pull/4114#discussion_r1921649899
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#1782