Generics in aliaced types #10776
-
Hi, I'm currently working on a PHP project and I'm having trouble using generics in aliased types with PHPStan. https://phpstan.org/r/7f1a54f4-bbd7-455c-b9f5-9eced44e19fe I'm not sure if I'm using generics and type aliases correctly or if there's a limitation with PHPStan's type system that I'm not aware of. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Unfortunately aliases don't support referencing types from |
Beta Was this translation helpful? Give feedback.
Unfortunately aliases don't support referencing types from
@template
. One reason for that is that type aliases can also be imported to other files where it wouldn't make any sense anymore.