Skip to content

Commit

Permalink
fix: change SuggestionEmoji to extended EmojiSearchIndexResult
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela committed Nov 5, 2024
1 parent 949446b commit 79f9eba
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/ChatAutoComplete/ChatAutoComplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { CommandResponse, UserResponse } from 'stream-chat';

import type { TriggerSettings } from '../MessageInput/DefaultTriggerProvider';
import type { CustomTrigger, DefaultStreamChatGenerics, UnknownType } from '../../types/types';
import type { EmojiSearchIndex } from '../MessageInput';
import { EmojiSearchIndex, EmojiSearchIndexResult } from '../MessageInput';

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

Expand All @@ -23,9 +23,7 @@ export type SuggestionUser<
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
> = UserResponse<StreamChatGenerics>;

export type SuggestionEmoji<T extends UnknownType = UnknownType> = Awaited<
ReturnType<EmojiSearchIndex<T>['search']>
>;
export type SuggestionEmoji<T extends UnknownType = UnknownType> = EmojiSearchIndexResult & T;

export type SuggestionItem<
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
Expand Down

0 comments on commit 79f9eba

Please sign in to comment.