Skip to content

Feature: Lazy emitter initialization #4

Description

@hoichi

At the moment fromEvent attaches its listener to pre-existing EventEmitter. And since it doesn’t start listening the observable is run, it’s quite possible for it to miss some events, which might be unwelcome in some cases.

Proposal: instead of an emitter, accept a callback that returns an emitter, and call it inside .run.

I think I’d rather create a separate lazyFromEvent than overload fromEvent and have an overhead of runtime parameter checking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions