mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-29 11:39:36 -05:00
Update oxfmt to version 0.70.0 (#40676)
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user