psalm
psalm copied to clipboard
Support extended types `stdClass<type>` and `stdClass{foo:type}`
stdClass
objects doesn't define their property types. Since they are hash-map like arrays, I would like to define their type like an array.
Using type template
stdClass<string|int>
Using type map
stdClass{foo:string,optional?:int}
https://psalm.dev/r/2fd2b967f8