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

Suggestion: Better type for "once" method #33

Open
Tomucha opened this issue Sep 14, 2016 · 1 comment
Open

Suggestion: Better type for "once" method #33

Tomucha opened this issue Sep 14, 2016 · 1 comment

Comments

@Tomucha
Copy link

Tomucha commented Sep 14, 2016

Čusne?

First of all - amazing work, really. I wouldn't have the patience for this :-)

Suggestion: ref.once("...") takes String as an argument, which is not very "typed" and "Darty". So maybe this:

ref.once.value.then(...)
ref.once.childAdded.then(...)

...but it's probably to late for that, so maybe:

ref.once(EventType.value).then(...)
ref.once(EventType.childAdded).then(...)

... or at least list possible eventTypes in documentation of once method.

Or maybe it's all a moo point, and ref.onValue.first does exactly the same? In that case, it should also be mentioned in documentation, because it's not obvious (all that firebase magic, who knows what's going on behind the curtain).

@Janamou
Copy link
Owner

Janamou commented Sep 14, 2016

@Tomucha Good point! I will take a look at it.

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

No branches or pull requests

2 participants