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

fix(typings): allow bufferCreationInterval null for bufferTime #3734

Merged
merged 2 commits into from
May 25, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(typings): allow bufferCreationInterval null for bufferTime
The tests for bufferTime verifies that it is possible to set
bufferCreationInterval to null, but the typings did not allow it
when strictNullChecks were set to true.

Fixes #3728
  • Loading branch information
mattiash committed May 23, 2018
commit 0f4dafc681352e90b7881df3f2aa08f190456b2a
4 changes: 2 additions & 2 deletions compat/operator/bufferTime.ts
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ import { bufferTime as higherOrder } from 'rxjs/operators';

/* tslint:disable:max-line-length */
export function bufferTime<T>(this: Observable<T>, bufferTimeSpan: number, scheduler?: SchedulerLike): Observable<T[]>;
export function bufferTime<T>(this: Observable<T>, bufferTimeSpan: number, bufferCreationInterval: number, scheduler?: SchedulerLike): Observable<T[]>;
export function bufferTime<T>(this: Observable<T>, bufferTimeSpan: number, bufferCreationInterval: number, maxBufferSize: number, scheduler?: SchedulerLike): Observable<T[]>;
export function bufferTime<T>(this: Observable<T>, bufferTimeSpan: number, bufferCreationInterval: number | null, scheduler?: SchedulerLike): Observable<T[]>;
export function bufferTime<T>(this: Observable<T>, bufferTimeSpan: number, bufferCreationInterval: number | null, maxBufferSize: number, scheduler?: SchedulerLike): Observable<T[]>;
/* tslint:enable:max-line-length */

/**
4 changes: 2 additions & 2 deletions src/internal/operators/bufferTime.ts
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ import { OperatorFunction, SchedulerAction, SchedulerLike } from '../types';

/* tslint:disable:max-line-length */
export function bufferTime<T>(bufferTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
export function bufferTime<T>(bufferTimeSpan: number, bufferCreationInterval: number, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
export function bufferTime<T>(bufferTimeSpan: number, bufferCreationInterval: number, maxBufferSize: number, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
export function bufferTime<T>(bufferTimeSpan: number, bufferCreationInterval: number | null, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
export function bufferTime<T>(bufferTimeSpan: number, bufferCreationInterval: number | null, maxBufferSize: number, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
/* tslint:enable:max-line-length */

/**