-
Notifications
You must be signed in to change notification settings - Fork 74
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
Support user defined type guards in filter predicates #44
Comments
wow I didn't know that that's awesome. |
@OliverJAsh 🎉 thanks! |
@trxcllnt Using 2.1.4, the example above still seems to generate an error. Any ideas? |
@OliverJAsh I don't think they made it in the 2.1.4 release, will circle back with @mattpodwysocki and do another release soon |
@OliverJAsh just pushed this out in 2.2.0, but also be aware of this breaking change to |
I'm using 2.2.0 and the example above still seems to generate an error. Any ideas? @trxcllnt
|
@OliverJAsh edit hm this is weird. trying to figure it out, gimme a bit. There's still the issue that |
also ran prettier on everything, so there's that :/ closes #44 for real now tho
also ran prettier on everything, so there's that :/ closes #44 for real now tho
also ran prettier on everything, so there's that :/ closes #44 for real now tho
Thanks for the fix @trxcllnt. I'll give it another go once it's released.
I've updated the example in the original post now. |
@trxcllnt Thanks for fixing this! My original example now works (ix 2.3.1), however this doesn't: // no error, good!
const xs2: Ix.Iterable<number> = Ix.Iterable
.from(['foo', 1])
.filter((x): x is number => typeof x === 'number')
// no error, good!
const xs2b: Ix.Iterable<number> = xs2.map(x => x);
// unexpected error, bad!
const xs3: Ix.Iterable<number> = Ix.Iterable
.from(['foo', 1])
.filter((x): x is number => typeof x === 'number')
.map(x => x) Any ideas what is causing this? |
I opened a separate issue to track the above #162 |
IxJS version:
2.1.0
Code to reproduce:
The text was updated successfully, but these errors were encountered: