Bekacru / better-fetch

Advanced fetch wrapper for typescript
https://better-fetch.vercel.app/
210 stars 7 forks source link

No Zod error thrown when using `createSchema()` #9

Closed OwenVey closed 4 months ago

OwenVey commented 4 months ago

I set up a StackBlitz showing this issue here https://stackblitz.com/edit/vitejs-vite-dzsanf?file=src%2Fmain.ts.

Note that data2 has an incorrect schema for the response but no error is thrown. The type of data2 is still matches the output schema which is incorrect and a Zod error should be thrown.

Bekacru commented 4 months ago

this should be fixed on the latest patch release (v1.1.4)

OwenVey commented 4 months ago

Verified that this was fixed in 1.1.4!