From 6a928f68261f3e3f67182a8658c7fc9ae6572814 Mon Sep 17 00:00:00 2001 From: MartinCupela <32706194+MartinCupela@users.noreply.github.com> Date: Thu, 8 Feb 2024 11:53:07 +0100 Subject: [PATCH] fix: export DefaultStreamChatGenerics (#2266) --- src/index.ts | 1 + src/types/index.ts | 1 + src/types/types.ts | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 src/types/index.ts diff --git a/src/index.ts b/src/index.ts index 773f33e16..e5eb9f321 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ export * from './components'; export * from './context'; export * from './i18n'; +export * from './types'; export * from './utils'; diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 000000000..80e3614ff --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1 @@ +export { DefaultStreamChatGenerics } from './types'; diff --git a/src/types/types.ts b/src/types/types.ts index 27efc772e..e492bcc35 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -39,16 +39,6 @@ export type DefaultChannelType = UnknownType & { subtitle?: string; }; -export type DefaultStreamChatGenerics = ExtendableGenerics & { - attachmentType: DefaultAttachmentType; - channelType: DefaultChannelType; - commandType: LiteralStringForUnion; - eventType: UnknownType; - messageType: DefaultMessageType; - reactionType: UnknownType; - userType: DefaultUserType; -}; - export type DefaultMessageType< StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics > = UnknownType & { @@ -72,6 +62,16 @@ export type DefaultUserType< mutes?: Array>; }; +export type DefaultStreamChatGenerics = ExtendableGenerics & { + attachmentType: DefaultAttachmentType; + channelType: DefaultChannelType; + commandType: LiteralStringForUnion; + eventType: UnknownType; + messageType: DefaultMessageType; + reactionType: UnknownType; + userType: DefaultUserType; +}; + export type GiphyVersions = | 'original' | 'fixed_height'