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

Pipe lost typing for inference generic #6362

Open
RomanRolginSky opened this issue May 5, 2021 · 3 comments
Open

Pipe lost typing for inference generic #6362

RomanRolginSky opened this issue May 5, 2021 · 3 comments

Comments

@RomanRolginSky
Copy link

RomanRolginSky commented May 5, 2021

Bug Report

Current Behavior
Pipe operator resolves type to never instead of correct type of Observable

Expected behavior
Operators' types should be resolved correctly.
The correct type inferred from generic correctly

Reproduction

Environment

  • Runtime: Reproduces locally on Mac OS 11.1, Node v.12.16.1
  • RxJS version: 6.6.7 in codesandbox.io, 6.6.2 locally

Additional context/Screenshots
I tried to reproduce this behavior without rxjs but without success so seems like its somehow relates to rxjs pipe

@cartant
Copy link
Collaborator

cartant commented May 5, 2021

I don't believe that this is an RxJS problem. Rather, I think it is more likely to be a TypeScript issue.

I tried to reproduce this behavior without rxjs but without success

I would suggest you try reproducing the problem in the TypeScript Playground and reporting it as a TypeScript problem if/when you are able to do so. You can use this Playground as a starting point. As long as the types have a similar structure to what's in RxJS, it should be reproducible.

@RomanRolginSky
Copy link
Author

@cartant thank for reply,
I'll try to reproduce the issue with your playground 🙌🏻

@RomanRolginSky
Copy link
Author

Typescript project issue link →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants