iway1 / trpc-panel

MIT License
663 stars 50 forks source link

fix: Merge zod object inputs #80

Open dca123 opened 1 year ago

dca123 commented 1 year ago

Continuing the work on #64 , this first verifies that each of the input is a zod object before attempting to merge it. This will also fix #78.

I had to remove zod as a dependency, since having it both as a dependency and peer, causes the prototype on the inputs to be undefined. This meant, I couldn't use (input instanceOf z.ZodObject). That's discussed a bit more here - https://github.com/colinhacks/zod/issues/2241

Should I write a test for this ?

tungvn commented 10 months ago

Please merge it