Output validator for Async generators on a streaming procedure using Zod
Might be a bit of a long shot but I was curious if anyone else has managed to do this?
Im just getting typescript errors as it wants the query return type to be a
MaybePromise<T>
when I have AsyncGenerator<T>
and there doesnt seem to be anything in zod (apart from brute forcing through custom, which defeats the purpose) to make this work.
Keen to here anyones thoughts!
Type 'AsyncGenerator<number, void, unknown>' is not assignable to type 'MaybePromise<number>'.
0 Replies