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

BREAKING: Refactor Generics into Single Generic #490

Merged
merged 2 commits into from
Feb 11, 2022
Merged

Conversation

mahboubii
Copy link
Contributor

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

Changelog

  • Breaking change for apps using Typescript and Stream Generics, in order to upgrade:
- connect<UserType, ActivityType, CollectionType, ReactionType, ChildReactionType, PersonalizationType>()

+ connect<{
  userType: UserType,
  activityType: ActivityType,
  collectionType: CollectionType
  reactionType: ReactionType,
  childReactionType: ChildReactionType,
  personalizationType: PersonalizationType,
}>()

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2022

Size Change: -29 B (0%)

Total Size: 98.4 kB

Filename Size Change
dist/js/getstream.js 67.6 kB -29 B (0%)
ℹ️ View Unchanged
Filename Size Change
dist/js_min/getstream.js 30.9 kB 0 B

compressed-size-action

Copy link
Contributor

@ferhatelmas ferhatelmas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@MartinCupela MartinCupela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ferhatelmas ferhatelmas merged commit 7c7c186 into main Feb 11, 2022
@ferhatelmas ferhatelmas deleted the single-generic branch February 11, 2022 14:16
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.

None yet

3 participants