-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
severest/retrobot
#221Labels
TSIssues and PRs related purely to TypeScript issuesIssues and PRs related purely to TypeScript issuesbugConfirmed bugConfirmed bughelp wantedIssues we wouldn't mind assistance with.Issues we wouldn't mind assistance with.
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
TSIssues and PRs related purely to TypeScript issuesIssues and PRs related purely to TypeScript issuesbugConfirmed bugConfirmed bughelp wantedIssues we wouldn't mind assistance with.Issues we wouldn't mind assistance with.