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

type: fix ignoreElements generic type #7279

Closed
wants to merge 1 commit into from
Closed

Conversation

caikan
Copy link

@caikan caikan commented Jun 3, 2023

Description:
If ignoreElements follows tap immediately, the type of the tap parameter will be incorrectly inferred to be unknown.

import { ignoreElements, of, tap } from 'rxjs';

function test() {
  const data = { value: 1 }
  of(data).pipe(
    tap(data => console.log(data.value)),
    // ---------------------^~~~ ['data' is of type 'unknown'.ts(18046)]
    ignoreElements(),
  )
}

@kwonoj
Copy link
Member

kwonoj commented Jun 3, 2023

Isn't this exactly same as #7204 (comment) ?

@benlesh
Copy link
Member

benlesh commented Dec 19, 2023

I think this was already done in another commit.

Thank you so much for the PR, though, @caikan!!

@benlesh benlesh closed this Dec 19, 2023
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

Successfully merging this pull request may close these issues.

4 participants