I have a function that accept an TKeyedArray and insert a specific element into it. For example, given a input $arr which is in type of @template T of array{id: int} , after having operation like $arr['baz'] = 'baz'; the output should becomes T & array{'baz':string}.
https://psalm.dev/r/ef60918b5a
I found a similar issue #3339 that describes a more general situation, but don't know if there is a solution for this case.