Update to Typescript 7 (#39987)

This commit is contained in:
Renaud Chaput authored and GitHub committed 2026-08-10 12:51:10 +00:00
1 parent 6844f4009a
commit ecf9d23752
18 files changed
+397 -167

No files matched your search

@@ -69,6 +69,7 @@ const AccountButtonsOther: FC<
const dispatch = useAppDispatch();
const handleNotifyToggle = useCallback(() => {
if (account) {
// @ts-expect-error this action is not typed yet
dispatch(followAccount(account.id, { notify: !relationship?.notifying }));
}
}, [dispatch, account, relationship]);
@@ -395,6 +395,7 @@ function getMenuItems({
),
action: () => {
dispatch(
// @ts-expect-error this action is not typed yet
followAccount(account.id, {
reblogs: !relationship.showing_reblogs,
}),
@@ -62,9 +62,7 @@ export const EditedTimestamp: React.FC<{
const formattedDate = (
<RelativeTimestamp timestamp={item.get('created_at') as string} long />
);
const formattedName = (
<InlineAccount accountId={item.get('account') as string} />
);
const formattedName = <InlineAccount accountId={item.get('account')} />;
const label = (item.get('original') as boolean) ? (
<FormattedMessage
@@ -124,6 +124,7 @@ export const FollowButton: React.FC<{
}),
);
} else {
// @ts-expect-error this action is not typed yet
dispatch(followAccount(accountId));
}
}, [signedIn, relationship, accountId, withUnmute, account, dispatch]);
@@ -13,12 +13,7 @@ export const RemoteHint: React.FC<RemoteHintProps> = ({ accountId }) => {
accountId ? state.accounts.get(accountId) : undefined,
);
const domain = account?.acct ? account.acct.split('@')[1] : undefined;
if (
!account ||
!account.url ||
account.acct !== account.username ||
!domain
) {
if (!account?.url || account.acct !== account.username || !domain) {
return null;
}