Update oxfmt to version 0.70.0 (#40676)

This commit is contained in:
Matt Jankowski
2026-09-24 05:18:18 +00:00
committed by GitHub
parent 2b0e8b47fa
commit 98a1573008
6 changed files with 116 additions and 105 deletions

View File

@@ -13,9 +13,11 @@ type RenameKeysStartingWith<
TPrefix extends string,
TReplacement extends string,
> = {
[TKey in keyof TObject as TKey extends `${TPrefix}${infer TSuffix}`
? `${TReplacement}${TSuffix}`
: TKey]: TObject[TKey];
[
TKey in keyof TObject as TKey extends `${TPrefix}${infer TSuffix}`
? `${TReplacement}${TSuffix}`
: TKey
]: TObject[TKey];
};
type ActionProps =

View File

@@ -47,12 +47,10 @@ const getCollectionItems = createAppSelector(
state.collections.collections[collectionId ?? '']?.items,
],
(accounts, collectionAccountItems) =>
(collectionAccountItems ?? []).map(
(item): CollectionItemWithAccount => ({
...item,
account: item.account_id ? accounts.get(item.account_id) : null,
}),
),
(collectionAccountItems ?? []).map((item): CollectionItemWithAccount => ({
...item,
account: item.account_id ? accounts.get(item.account_id) : null,
})),
);
function sortAccounts(

View File

@@ -30,10 +30,12 @@ import {
import { hashObjectArray } from '@/mastodon/utils/hash';
type ProfileData = {
[Key in keyof Omit<
ApiProfileJSON,
'note' | 'fields' | 'featured_tags'
> as CamelCase<Key>]: ApiProfileJSON[Key];
[
Key in keyof Omit<
ApiProfileJSON,
'note' | 'fields' | 'featured_tags'
> as CamelCase<Key>
]: ApiProfileJSON[Key];
} & {
bio: ApiProfileJSON['note'];
fields: FieldData[];
@@ -43,10 +45,9 @@ type ProfileData = {
export type FieldData = ApiAccountFieldJSON & { id: string };
export type TagData = {
[Key in keyof Omit<
ApiFeaturedTagJSON,
'statuses_count'
> as CamelCase<Key>]: ApiFeaturedTagJSON[Key];
[
Key in keyof Omit<ApiFeaturedTagJSON, 'statuses_count'> as CamelCase<Key>
]: ApiFeaturedTagJSON[Key];
} & {
statusesCount: number;
};