-- schema.json --
{
    "$schema": "https://json-schema.org/draft/2019-09/schema",
    "$id": "https://foo.example/schema",
    "if": {
        "properties": {
            "a": {
                "type": "number"
            }
        },
        "required": [
            "a"
        ]
    },
    "then": {
        "properties": {
            "b": {
                "type": "number"
            }
        },
        "required": [
            "b"
        ]
    },
    "type": "object",
    "properties": {
        "c": {
            "type": "string"
        }
    }
}
-- out/decode/extract --
@jsonschema(schema="https://json-schema.org/draft/2019-09/schema")
@jsonschema(id="https://foo.example/schema")
matchIf({
	a!: number
	...
}, {
	b!: number
	...
}, _) & {
	c?: string
	...
}
