You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GiftedChatProps does not use GiftedChatTMessage generic type parameter. Without this, types that extend IMessage will have type mismatch errors when used as props; e.g. Type 'MyMessage | undefined' is not assignable to type 'Message | undefined'.
This seems to be a bug since GiftedChatProps has its own TMessage type parameter which is passed to other prop types.
Expected Results
GiftedChatProps should use TMessage as a type param: declare function GiftedChat<TMessage extends IMessage = IMessage>(props: GiftedChatProps<TMessage>): JSX.Element;
Additional Information
react-native-gifted-chat version: 2.4.0
The text was updated successfully, but these errors were encountered:
Issue Description
GiftedChatProps
does not useGiftedChat
TMessage
generic type parameter. Without this, types that extendIMessage
will have type mismatch errors when used as props; e.g.Type 'MyMessage | undefined' is not assignable to type 'Message | undefined'.
Steps to Reproduce / Code Snippets
This line: https://github.com/FaridSafi/react-native-gifted-chat/blob/ba06287912151dbfb71951893d0454db8aafd5a5/src/GiftedChat.tsx#L55C38-L55C38
This seems to be a bug since
GiftedChatProps
has its ownTMessage
type parameter which is passed to other prop types.Expected Results
GiftedChatProps
should useTMessage
as a type param:declare function GiftedChat<TMessage extends IMessage = IMessage>(props: GiftedChatProps<TMessage>): JSX.Element;
Additional Information
The text was updated successfully, but these errors were encountered: