Would be really helpful if we could do this:
@schema
type thing<'a> = {
a: 'a,
}
// Would generate:
let thingSchema = aSchema => S.object(s => {
a: s.field("a", aSchema),
})
and then:
@schema
type parent = {
property: thing<int>,
}
// Would generate:
let parentSchema = S.object(s => {
property: s.field("property", thingSchema(S.int),
})
Do you foresee any problems with this idea? Right now I'm just writing this manually each time.