const myForwardCompatibleSchema = Schema.Union(
Schema.Struct({ type: Schema.Literal("type1"), one: Schema.Number }),
Schema.Struct({ type: Schema.Literal("type2"), two: Schema.Number }),
Schema.Struct({ type: Schema.Literal("unknown") }),
).orElse(() => ({ type: "unknown" }))
const myForwardCompatibleSchema = Schema.Union(
Schema.Struct({ type: Schema.Literal("type1"), one: Schema.Number }),
Schema.Struct({ type: Schema.Literal("type2"), two: Schema.Number }),
Schema.Struct({ type: Schema.Literal("unknown") }),
).orElse(() => ({ type: "unknown" }))