Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: convert Generics into a single Generic #837

Merged
merged 19 commits into from
Feb 11, 2022

Conversation

mahboubii
Copy link
Contributor

@mahboubii mahboubii commented Dec 3, 2021

Description of the changes, What, Why and How?

Currently internal generics are verbose and hard to maintain, with this change we move to a single generic type passed into StreamChat by users which get passed around easily in internal functions. We also no longer need to maintain the generics order. This PR includes no JS changes.

based on the great work here #752

Changelog

  • Breaking change for apps using Typescript and Stream Generics, in order to upgrade:
- StreamChat<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>

+ StreamChat<{
  attachmentType: AttachmentType;
  channelType: ChannelType;
  commandType: CommandType;
  eventType: EventType;
  messageType: MessageType;
  reactionType: ReactionType;
  userType: UserType;
}>

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2021

Size Change: -1.19 kB (0%)

Total Size: 284 kB

Filename Size Change
dist/browser.es.js 62 kB -297 B (0%)
dist/browser.js 62.6 kB -291 B (0%)
dist/index.es.js 62 kB -304 B (0%)
dist/index.js 62.7 kB -296 B (0%)
ℹ️ View Unchanged
Filename Size Change
dist/browser.full-bundle.min.js 34.4 kB 0 B

compressed-size-action

@mahboubii mahboubii marked this pull request as ready for review December 3, 2021 15:57
@mahboubii mahboubii removed the request for review from vini-btc January 12, 2022 09:02
@mahboubii mahboubii changed the title BREAKING: Refactor Generics into Single Generic BREAKING CHANGE: Refactor Generics into Single Generic Jan 31, 2022
@mahboubii mahboubii changed the title BREAKING CHANGE: Refactor Generics into Single Generic refactor!: Convert Generics into a Single Generic Jan 31, 2022
@mahboubii mahboubii changed the title refactor!: Convert Generics into a Single Generic refactor!: convert Generics into a single Generic Jan 31, 2022
@vishalnarkhede vishalnarkhede merged commit 6406db4 into master Feb 11, 2022
@vishalnarkhede vishalnarkhede deleted the single-generic branch February 11, 2022 15:07
This was referenced Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants