Skip to content

Commit 658d722

Browse files
authored
fix: change SuggestionEmoji to extended EmojiSearchIndexResult (#2551)
1 parent 3b84cdc commit 658d722

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/ChatAutoComplete/ChatAutoComplete.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { CommandResponse, UserResponse } from 'stream-chat';
1111

1212
import type { TriggerSettings } from '../MessageInput/DefaultTriggerProvider';
1313
import type { CustomTrigger, DefaultStreamChatGenerics, UnknownType } from '../../types/types';
14-
import type { EmojiSearchIndex } from '../MessageInput';
14+
import { EmojiSearchIndex, EmojiSearchIndexResult } from '../MessageInput';
1515

1616
type ObjectUnion<T> = T[keyof T];
1717

@@ -23,9 +23,7 @@ export type SuggestionUser<
2323
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
2424
> = UserResponse<StreamChatGenerics>;
2525

26-
export type SuggestionEmoji<T extends UnknownType = UnknownType> = Awaited<
27-
ReturnType<EmojiSearchIndex<T>['search']>
28-
>;
26+
export type SuggestionEmoji<T extends UnknownType = UnknownType> = EmojiSearchIndexResult & T;
2927

3028
export type SuggestionItem<
3129
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,

0 commit comments

Comments
 (0)