diff --git a/packages/desktop-client/src/components/LoggedInUser.tsx b/packages/desktop-client/src/components/LoggedInUser.tsx
index 330916addd8..0c0662d3855 100644
--- a/packages/desktop-client/src/components/LoggedInUser.tsx
+++ b/packages/desktop-client/src/components/LoggedInUser.tsx
@@ -6,6 +6,7 @@ import { useLocation } from 'react-router-dom';
import { closeBudget, getUserData, signOut } from 'loot-core/client/actions';
import { type State } from 'loot-core/src/client/state-types';
import { type RemoteFile, type SyncedLocalFile } from 'loot-core/types/file';
+import { type TransObjectLiteral } from 'loot-core/types/util';
import { useAuth } from '../auth/AuthProvider';
import { Permissions } from '../auth/types';
@@ -208,7 +209,9 @@ export function LoggedInUser({
(
logged in as:{' '}
- {{ userName: userData?.displayName } as any}
+
+ {{ userName: userData?.displayName } as TransObjectLiteral}
+
)
@@ -224,7 +227,7 @@ export function LoggedInUser({
logged in as:{' '}
- {{ userName: userData?.displayName } as any}
+ {{ userName: userData?.displayName } as TransObjectLiteral}
diff --git a/packages/desktop-client/src/components/modals/CloseAccountModal.tsx b/packages/desktop-client/src/components/modals/CloseAccountModal.tsx
index da2a24d4c2d..2b476bd37d1 100644
--- a/packages/desktop-client/src/components/modals/CloseAccountModal.tsx
+++ b/packages/desktop-client/src/components/modals/CloseAccountModal.tsx
@@ -11,6 +11,7 @@ import {
} from 'loot-core/client/actions';
import { integerToCurrency } from 'loot-core/src/shared/util';
import { type AccountEntity } from 'loot-core/src/types/models';
+import { type TransObjectLiteral } from 'loot-core/types/util';
import { useAccounts } from '../../hooks/useAccounts';
import { useCategories } from '../../hooks/useCategories';
@@ -121,7 +122,10 @@ export function CloseAccountModal({
Are you sure you want to close{' '}
- {{ accountName: account.name } as any}?{' '}
+
+ {{ accountName: account.name } as TransObjectLiteral}
+
+ ?{' '}
{canDelete ? (
@@ -151,7 +155,11 @@ export function CloseAccountModal({
This account has a balance of{' '}
- {{ balance: integerToCurrency(balance) } as any}
+ {
+ {
+ balance: integerToCurrency(balance),
+ } as TransObjectLiteral
+ }
. To close this account, select a different account to
transfer this balance to:
diff --git a/packages/desktop-client/src/components/reports/SaveReportDelete.tsx b/packages/desktop-client/src/components/reports/SaveReportDelete.tsx
index 40b813198bf..80559d620e9 100644
--- a/packages/desktop-client/src/components/reports/SaveReportDelete.tsx
+++ b/packages/desktop-client/src/components/reports/SaveReportDelete.tsx
@@ -1,6 +1,8 @@
import React from 'react';
import { Trans } from 'react-i18next';
+import { type TransObjectLiteral } from 'loot-core/types/util';
+
import { theme } from '../../style/theme';
import { Button } from '../common/Button2';
import { Stack } from '../common/Stack';
@@ -25,7 +27,7 @@ export function SaveReportDelete({
Are you sure you want to delete report:{' '}
- {{ name } as any}
+ {{ name } as TransObjectLiteral}
diff --git a/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx b/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx
index ddd7f12d3ec..d266c2afdd4 100644
--- a/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx
+++ b/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx
@@ -12,7 +12,10 @@ import { sendCatch } from 'loot-core/src/platform/client/fetch';
import * as monthUtils from 'loot-core/src/shared/months';
import { getRecurringDescription } from 'loot-core/src/shared/schedules';
import { type RecurConfig, type RecurPattern } from 'loot-core/types/models';
-import { type WithRequired } from 'loot-core/types/util';
+import {
+ type TransObjectLiteral,
+ type WithRequired,
+} from 'loot-core/types/util';
import { useDateFormat } from '../../hooks/useDateFormat';
import { SvgAdd, SvgSubtract } from '../../icons/v0';
@@ -540,7 +543,7 @@ function RecurringScheduleTooltip({
style={{ userSelect: 'none', marginLeft: 5 }}
>
{' '}
- {{ beforeOrAfter: '' } as any} weekend
+ {{ beforeOrAfter: '' } as TransObjectLiteral} weekend
diff --git a/packages/loot-core/src/types/util.d.ts b/packages/loot-core/src/types/util.d.ts
index fd0c0345d83..48e7fefd076 100644
--- a/packages/loot-core/src/types/util.d.ts
+++ b/packages/loot-core/src/types/util.d.ts
@@ -9,3 +9,8 @@ export type EverythingButIdOptional = { id: T['id'] } & Partial<
>;
export type WithRequired = T & Required>;
+
+// Allows use of object literals inside child elements of `Trans` tags
+// see https://github.com/i18next/react-i18next/issues/1483
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export type TransObjectLiteral = any;