Skip to content

bug(throttle): Does not emit last value on source complete #5732

Open
@benlesh

Description

@benlesh

throttleTime(n, s, config) should be equivalent to throttle(() => timer(n, s), config)... But it's not. The issue is that throttle does not behave correctly when the source completes.

If the source completes, we're trailing, and we have a trailing value already, the result should wait for the throttle duration to end, then emit the last value, then complete the result. If the source completes and we don't have a trailing value -- or we're not trailing -- the result should complete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions