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

tech(alias): Create a container to handle aliased values #58

Merged
merged 6 commits into from
Sep 28, 2023

Conversation

pjechris
Copy link
Owner

⚽️ Description

Revamp the way aliases are handled inside the SDK: instead of relying on double Observable just create a wrapper (AliasContainer) and update its content everytime the alias changes. Rest of the SDK will then do the work! 🎉

🔨 Implementation details

  • Create a new type, AliasContainer that represents a alias and its content (value)
  • Store EntityNode<AliasContainer<T>> instances instead of complexe Observable<EntityNode<T>>
  • Register aliases changes inside ObserverRegistry
  • Because now aliases behave like any entity, AliasObserver is not needed anymore and we can also use EntityObserver for aliases

@pjechris pjechris added refacto Code that change internal structure tech labels Sep 28, 2023
@pjechris pjechris merged commit 534112b into main Sep 28, 2023
2 checks passed
@pjechris pjechris deleted the tech/alias-container branch September 28, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refacto Code that change internal structure tech
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant