I am using Select from Hero UI, which uses a Set for its value. But when I do this, the schema validator types do not come out correctly. It seems they are transforming the types to be serializable, converting from Set to Array.
Here's a mini code snippet to reproduce:
import {Schema} from "effect";
export const CreateScheduleInputSchema = Schema.Struct({
daysOfWeek: Schema.Set(Schema.Enums(DayOfWeek)).pipe(Schema.mutable),
});
const form = useAppForm({
defaultValues: {
daysOfWeek: new Set(),
},
validators: {
// The types are wrong here!
onSubmit: Schema.standardSchemaV1(CreateScheduleInputSchema),
},
});
Is there something I am missing?