Skip to content

chore: cleanup onSnapshot implementations #148

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

Merged

Conversation

delaneyb
Copy link
Contributor

While I had mainly written this refactor to address bugs that were probably addressed in ba384c2 and c74f67a, I still believe this is worth submitting as the current onSnapshot handler implementations are very difficult to understand due to parameter names and overloads. This refactor aims to address the issue of parsing the parameters (with full type checking) centrally in a single parseOnSnapshotArgs helper, after which we can implement the actual handling logic in a way that looks much more intuitive in the individual onSnapshot methods.

@cla-bot cla-bot bot added the cla: yes label Oct 31, 2022
@triniwiz
Copy link
Member

Thank you, lovely improvement 🤩

@triniwiz triniwiz merged commit ffda578 into NativeScript:main Oct 31, 2022
@delaneyb delaneyb deleted the cleanup-onsnapshot-implementations branch November 3, 2022 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants