Skip to content

Pipe operator publishReplay cannot infer generic type. #3260

@bowenni

Description

@bowenni

RxJS version:
5.5.0

Code to reproduce:

declare const obs: Observable<number>;
const temp: null = obs.pipe(publishReplay(1));

Expected behavior:
I'm expecting Type 'Observable<number>' is not assignable to type 'null'.

Actual behavior:
Type 'Observable<any>' is not assignable to type 'null'.

Metadata

Metadata

Labels

TSIssues and PRs related purely to TypeScript issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions