Open kibertoad opened 12 months ago
@thorhj Can you check the repro here? It isn't failing for me even on the old zod-to-json-schema. What am I missing?
So tests were passing, but TS build was not. So I ended up just synchronizing the versions; guess it's not worse than it was before anyway.
@thorhj If I publish a prerelease version with this, will you be able to confirm it works as expected?
@kibertoad Yes I will be able to do that 👍
@kibertoad Just let me know when you publish a pre-release version with this change 😄
@thorhj My apologies, I think I got distracted by something else and never got to it. Could you please check 1.2.0? I think it should help
Hey @kibertoad
I just want to jump into the conversation, because I'm experiencing the same problem.
I'm working with the Slonik database library, which returns a readonly array, when fetching multiple rows from the database.
I have added the zod schema, which is a standard object array, with the necessary properties inside of it, so it matches the rows returned from the database. But when I'm trying to return my array of items, I get an error complaining about the array being a readonly array, which makes sense, because that's what Slonik is returning.
The only solution that I found that I can use to return the readonly array, is to spread the array, so it turns into a "normal" array. Is this an error with this library or Slonik?
Was this supposed to be shipped in version 1.2.0?
fixes #67