RxJS version:
6.1.0
Code to reproduce:
import {from} from 'rxjs'
import {bufferTime} from 'rxjs/operators'
from([1,2,3]).pipe(bufferTime(1000, null, 2)).subscribe(n => console.log(n))
Expected behavior:
Typescript code should compile the code correctly with strictNullChecks.
Actual behavior:
index.ts(4,37): error TS2345: Argument of type 'null' is not assignable to parameter of type 'number'.
Additional information:
The tests for bufferTime in spec/operators/bufferTime-spec.ts test that it works to send in null as bufferCreationInterval (https://github.com/ReactiveX/rxjs/blob/master/spec/operators/bufferTime-spec.ts#L45), but the typings for bufferTime specifies that bufferCreationInterval is a number only. The reason that your tests compile is that you have strictNullChecks set to false in tsconfig.json.
RxJS version:
6.1.0
Code to reproduce:
Expected behavior:
Typescript code should compile the code correctly with strictNullChecks.
Actual behavior:
Additional information:
The tests for bufferTime in spec/operators/bufferTime-spec.ts test that it works to send in null as bufferCreationInterval (https://github.com/ReactiveX/rxjs/blob/master/spec/operators/bufferTime-spec.ts#L45), but the typings for bufferTime specifies that bufferCreationInterval is a number only. The reason that your tests compile is that you have strictNullChecks set to false in tsconfig.json.