ciscoheat / sveltekit-superforms

Making SvelteKit forms a pleasure to use!
https://superforms.rocks
MIT License
2.26k stars 68 forks source link

effect adapter errors when using Schema from Effect #497

Open valterkraemer opened 1 month ago

valterkraemer commented 1 month ago

Description effect adapter errors when using Schema directly from effect instead of @effect/schema. This is the recommended way of doing it since Effect 3.10

Argument of type 'Struct<{ name: typeof String$; }>' is not assignable to parameter of type 'AnySchema'.
  Property '[TypeId]' is missing in type 'Struct<{ name: typeof String$; }>' but required in type 'Schema<any, any, never>'.
Screenshot 2024-10-31 at 17 28 00

If applicable, a MRE https://www.sveltelab.dev/8utko5i2yydzzjo

ciscoheat commented 1 month ago

Those eternal updates... I'll put it up for the next release.

valterkraemer commented 1 month ago

Those eternal updates... I'll put it up for the next release.

Great! Appreciate it!

ciscoheat commented 2 weeks ago

There are some breaking types in the 3.10 update that I cannot figure out. @szethh can you take a look at an update for the adapter, perhaps?

szethh commented 2 weeks ago

sure, i knew this was coming ahah 😅

right after we merged the adapter pr they combined Schema into the greater effect namespace.

will do this over the next week

ciscoheat commented 2 weeks ago

Thanks, I'll make a Superforms release today, just so you'll be using the latest version. :)