Testing and types updates (#39657)
This commit is contained in:
29 files changed
+263
-191
No files matched your search
@@ -11,7 +11,7 @@ import type {
|
||||
import { unescapeHTML } from 'mastodon/utils/html';
|
||||
|
||||
import { CustomEmojiFactory } from './custom_emoji';
|
||||
import type { CustomEmoji } from './custom_emoji';
|
||||
import type { CustomEmoji, CustomEmojiShape } from './custom_emoji';
|
||||
|
||||
// AccountField
|
||||
export interface AccountFieldShape extends Required<ApiAccountFieldJSON> {
|
||||
@@ -59,7 +59,7 @@ export type AccountShapeFull = Omit<
|
||||
AccountShape,
|
||||
'emojis' | 'fields' | 'roles'
|
||||
> & {
|
||||
emojis: CustomEmoji[];
|
||||
emojis: CustomEmojiShape[];
|
||||
fields: AccountFieldShape[];
|
||||
roles: AccountRoleShape[];
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Record as ImmutableRecord, isList } from 'immutable';
|
||||
|
||||
import type { ApiCustomEmojiJSON } from 'mastodon/api_types/custom_emoji';
|
||||
|
||||
type CustomEmojiShape = Required<ApiCustomEmojiJSON>; // no changes from server shape
|
||||
export type CustomEmojiShape = Required<ApiCustomEmojiJSON>; // no changes from server shape
|
||||
export type CustomEmoji = RecordOf<CustomEmojiShape>;
|
||||
|
||||
export const CustomEmojiFactory = ImmutableRecord<CustomEmojiShape>({
|
||||
|
||||
Reference in new issue
Block a user