final class Example extends MappedObject {
/** @var array{foo: string, bar: string} */
#[AllOf([
new ArrayShape([
'foo' => new StringValue(),
'bar' => new MixedValue()
]),
new ArrayShape([
'bar' => new StringValue(),
], allowExtraProps: true),
])]
public array $merged;
/** @var array{foo: string, bar: string} */
#[AllOf([
new ArrayShape(FullObject::class),
new ArrayShape(PartialObject::class, allowExtraProps: true),
])]
public array $merged2;
}