Fix types, at least

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-08-07 16:23:44 +02:00
parent 0fc8a2993f
commit 7fb07b66be
42 changed files with 204 additions and 269 deletions

View File

@ -1,17 +0,0 @@
import { Map as ImmutableMap, Record as ImmutableRecord, fromJS } from 'immutable';
import type { Account, EmbeddedEntity } from 'soapbox/types/entities';
const ChatRecord = ImmutableRecord({
account: null as EmbeddedEntity<Account>,
id: '',
unread: 0,
last_message: '' as string || null,
updated_at: '',
});
const normalizeChat = (chat: Record<string, any>) => ChatRecord(
ImmutableMap(fromJS(chat)),
);
export { ChatRecord, normalizeChat };

View File

@ -2,7 +2,6 @@ export { AccountRecord, FieldRecord, normalizeAccount } from './account';
export { AdminAccountRecord, normalizeAdminAccount } from './admin-account';
export { AdminReportRecord, normalizeAdminReport } from './admin-report';
export { AttachmentRecord, normalizeAttachment } from './attachment';
export { ChatRecord, normalizeChat } from './chat';
export { ChatMessageRecord, normalizeChatMessage } from './chat-message';
export { EmojiRecord, normalizeEmoji } from './emoji';
export { FilterRecord, normalizeFilter } from './filter';