We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Typescript doesn't seem to be smart enough to figure out that filtering with a tag-predicate results in an array of values satisfying the predicate.
Would this be a good addition?
import * as R from 'ramda' export function filterTag<Tag, T>(xs: T[], p: (x: T) => x is T & Tag): (T & Tag)[] { return R.filter(p, xs) }
The text was updated successfully, but these errors were encountered:
Unfortunately requires a signature at the call site due to microsoft/TypeScript#12798
Sorry, something went wrong.
Actually nevermind, it doesn't work with my function but does work with xs.filter.
xs.filter
No branches or pull requests
Typescript doesn't seem to be smart enough to figure out that filtering with a tag-predicate results in an array of values satisfying the predicate.
Would this be a good addition?
The text was updated successfully, but these errors were encountered: