<?php
/**
* @psalm-type Type = array{
* name: string
* }
*/
/**
* Description
*/
class A
{
/**
* @return Type
*/
public function test() {
return ['name' => 'ging'];
}
}
Actually type alias must still be resolved even if they are not document of class.
See: https://github.com/vimeo/psalm/blob/5.x/src/Psalm/Internal/Codebase/Scanner.php