const SchemaA = S.Struct({
foo: S.Number,
})
const SchemaB = SchemaA.pipe(S.filter(
({ foo }) => foo > 0,
{ jsonSchema: <snip> }
))
const SchemaC = SchemaB.pipe(S.extend(S.Struct({
bar: S.Boolean,
}))
console.log(JSONSchema.make(SchemaB)) // works fine
console.log(JSONSchema.make(SchemaC)) // throws Error: Missing annotation
const SchemaA = S.Struct({
foo: S.Number,
})
const SchemaB = SchemaA.pipe(S.filter(
({ foo }) => foo > 0,
{ jsonSchema: <snip> }
))
const SchemaC = SchemaB.pipe(S.extend(S.Struct({
bar: S.Boolean,
}))
console.log(JSONSchema.make(SchemaB)) // works fine
console.log(JSONSchema.make(SchemaC)) // throws Error: Missing annotation