Skip to content

Commit

Permalink
fix(typings): allow bufferCreationInterval null for bufferTime (#3734)
Browse files Browse the repository at this point in the history
* 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

* fix(typings): allow bufferCreationInterval undefined for bufferTime
  • Loading branch information
mattiash authored and benlesh committed May 25, 2018
1 parent 7e0ef1e commit 0bda9cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions compat/operator/bufferTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 | undefined, scheduler?: SchedulerLike): Observable<T[]>;
export function bufferTime<T>(this: Observable<T>, bufferTimeSpan: number, bufferCreationInterval: number | null | undefined, maxBufferSize: number, scheduler?: SchedulerLike): Observable<T[]>;
/* tslint:enable:max-line-length */

/**
Expand Down
4 changes: 2 additions & 2 deletions src/internal/operators/bufferTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 | undefined, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
export function bufferTime<T>(bufferTimeSpan: number, bufferCreationInterval: number | null | undefined, maxBufferSize: number, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
/* tslint:enable:max-line-length */

/**
Expand Down

0 comments on commit 0bda9cd

Please sign in to comment.