Skip to content

throttleTime(n, undefined, {leading: true, trailing: true}) ... double output #2727

Closed
@sod

Description

RxJS version: 6.5.1
Code to reproduce (6.5.1): https://stackblitz.com/edit/rxjs-tthiju
Expected behavior: One value initially, then defer next value for given duration
Actual behavior: One value initially, two values each duration
Additional information:

Test:

import { interval } from 'rxjs'; 
import { throttleTime, take } from 'rxjs/operators';

interval(50).pipe(
  throttleTime(1234, undefined, {leading: true, trailing: true}),
  take(8),
).subscribe(x => console.log(x));

// actual output: 0----24-25----49-50----74-75----99|
// expected output: 0----24----49----74----99----124----149----174|

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions