Skip to content

TypePredicate filter: better overload matching #817

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

Merged
merged 1 commit into from
Apr 18, 2025

Conversation

Cleric-K
Copy link
Contributor

@Cleric-K Cleric-K commented Apr 7, 2025

It turns out that when the type predicate takes any argument, TypeScript does not always select the proper filter() overload. Now the TypePredicate type takes also the original type V and the checked-for type S extends V. This seems to solve the problems.

It turns out that when the type predicate takes `any` argument, TypeScript does not always select the proper `filter()` overload. Now the `TypePredicate` type takes also the original type `V` and the checked-for type `S extends V`. This seems to solve the problems.
@raimohanska raimohanska merged commit c2ca777 into baconjs:master Apr 18, 2025
@raimohanska
Copy link
Contributor

Merged and released 3.0.22

@Cleric-K
Copy link
Contributor Author

BTW should the documentation at https://baconjs.github.io/ be automatically regenerated? It seems it's not.

@raimohanska
Copy link
Contributor

It's not that automatic. Needs to be built and pushed, that is.

@raimohanska
Copy link
Contributor

There's a lot that could be better, and as I've mentioned, I haven't been actively working on anything bacon.js related for years.

@raimohanska
Copy link
Contributor

Anyways, built and pushed. Thanks for pointing this out.

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.

2 participants