Testing and types updates (#39657)

This commit is contained in:
Echo authored and GitHub committed 2026-06-29 14:26:22 +00:00
1 parent b2ebfa13a9
commit 00a8fbc43e
29 files changed
+263 -191

No files matched your search

@@ -1,5 +1,7 @@
import { createSlice } from '@reduxjs/toolkit';
import type { CamelCase } from 'type-fest';
import { fetchAccount } from '@/mastodon/actions/accounts';
import {
apiDeleteFeaturedTag,
@@ -26,13 +28,12 @@ import {
createDataLoadingThunk,
} from '@/mastodon/store/typed_functions';
import { hashObjectArray } from '@/mastodon/utils/hash';
import type { SnakeToCamelCase } from '@/mastodon/utils/types';
type ProfileData = {
[Key in keyof Omit<
ApiProfileJSON,
'note' | 'fields' | 'featured_tags'
> as SnakeToCamelCase<Key>]: ApiProfileJSON[Key];
> as CamelCase<Key>]: ApiProfileJSON[Key];
} & {
bio: ApiProfileJSON['note'];
fields: FieldData[];
@@ -45,7 +46,7 @@ export type TagData = {
[Key in keyof Omit<
ApiFeaturedTagJSON,
'statuses_count'
> as SnakeToCamelCase<Key>]: ApiFeaturedTagJSON[Key];
> as CamelCase<Key>]: ApiFeaturedTagJSON[Key];
} & {
statusesCount: number;
};