Skip to content

Commit 7f8a9a0

Browse files
authored
fix: multiple module augmentation fails in Angular (#1488)
## CLA - [] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required). - [] Code changes are tested ## Description of the changes, What, Why and How? When removing generics from stream-chat-angular I had an issue where augmenting the same custom interface (for example `CustomChannelData`) from two places (SDK and sample app) some changes were ignored (detailed description: https://getstream.slack.com/archives/C06CF5TKRGA/p1741163343794659). Found this open GH issue for TypeScript: microsoft/TypeScript#46617 https://linear.app/stream/issue/ANG-31/drop-generics ## Changelog -
1 parent 91afa11 commit 7f8a9a0

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/index.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,20 @@ export * from './thread_manager';
2626
export * from './token_manager';
2727
export * from './types';
2828
export * from './channel_manager';
29-
export * from './custom_types';
29+
// Don't use * here, that can break module augmentation https://github.com/microsoft/TypeScript/issues/46617
30+
export type {
31+
CustomAttachmentData,
32+
CustomChannelData,
33+
CustomCommandData,
34+
CustomEventData,
35+
CustomMemberData,
36+
CustomMessageData,
37+
CustomPollOptionData,
38+
CustomPollData,
39+
CustomReactionData,
40+
CustomUserData,
41+
CustomThreadData,
42+
} from './custom_types';
3043
export {
3144
isOwnUser,
3245
chatCodes,

0 commit comments

Comments
 (0)