Skip to content

Suggestion: Better type for "once" method #33

@Tomucha

Description

@Tomucha

Č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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions