IDE type hints for collections with foreach

I read that type hints for collections (using foreach) should work now. But when I try out the example described here, VSCode complains about a wrong type (it infers TPage instead of Kirby\Cms\Page).

I’m using the newst version of VSCode with the PHP Intelephense plugin. Am I missing something here or is there another recommended plugin for VSCode?

This comes from here: $pages->children() | Kirby CMS

TPage: This is a type variable, in this case, a type representing a page.

And do you have any idea why VSCode/Intelephense is struggling with the type variable?

After updating to the latest Kirby version and the latest Intelephense release from 1 day ago, everything works as expected!