Max Arturo AS

Results 48 comments of Max Arturo AS

@DanielBreiner Agreed on this front. This is a fun little exercise in TS wrangling that I'm enjoying... :D

@DanielBreiner do you mind looking at #1615 and seeing if it works for you?

Whoa, for a second I was also pretty confused about this @DanielBreiner. There's a feature that will let you [abort early](https://github.com/colinhacks/zod#abort-early) but you will have to use `superRefine` to gain...

@DanielBreiner you're right! The type parameters do not `extend` output on `superRefine`, so it wouldn't be able to narrow down the type. We'd need to make a change so that...

Hey @OnkelTem, I was actually just working on a method that might help you out here. Try this out with `discriminatedUnion`s and see if it works for you (I demoed...

@Roundaround Yep that makes sense! That's a cleaner way of doing it for sure. @OnkelTem I'd go with their suggestion.

Hey @Firfi since I've been working on `discriminatedUnion` wanted to give my humble commentary on this. First, I agree with @necauqua in the math definition of the discriminated union. But...

Seems a reasonable ask! Also shouldn't be hard to do a PR. In the meanwhile I wonder how you go about doing this manually? Naively, if I had to do...

@JacobWeisenburger do you have approval privileges? Do you mind looking at this? Thanks!

@JacobWeisenburger understood! I tried to be thorough with the tests to catch any edge cases I could think of. With that said - this is additive so if anything, it...