Skip to content

Commit

Permalink
fix(typing): use generic TMessage on GiftedChat props
Browse files Browse the repository at this point in the history
  • Loading branch information
habovh committed Apr 8, 2024
1 parent ba06287 commit 087f9d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GiftedChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dayjs.extend(localizedFormat)

export interface GiftedChatProps<TMessage extends IMessage = IMessage> {
/* Message container ref */
messageContainerRef?: React.RefObject<FlatList<IMessage>>
messageContainerRef?: React.RefObject<FlatList<TMessage>>
/* text input ref */
textInputRef?: React.RefObject<TextInput>
/* Messages to display */
Expand Down Expand Up @@ -229,7 +229,7 @@ export interface GiftedChatState<TMessage extends IMessage = IMessage> {
}

function GiftedChat<TMessage extends IMessage = IMessage>(
props: GiftedChatProps,
props: GiftedChatProps<TMessage>,
) {
const {
messages = [],
Expand Down

0 comments on commit 087f9d3

Please sign in to comment.