How to get type templates of extendend class/interface #9255
thomasvargiu
started this conversation in
Plugin development
Replies: 1 comment
-
I'm not sure I understood everything correctly, but you should be able to retrieve parameters through |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm in the situation where I have this function:
and I need to write a plugin to be sure that the returned closure requires the same arguments of the
$function
argument.The plugin is
FunctionReturnTypeProviderInterface
and I'm able to check whether the$function
returns aPromiseInterface
instance with:Now, we can imagine we have other implementations that extends
PromiseInterface
with other templates, I want my function to always returns aPromiseInterface<value>
, but I need to find the right template value.If I have a type like this:
The question is: how can I have the template value of
PromiseInterface
from another type that extends it?Is it a missing available feature from public classes? I don't want to use internal classes.
Beta Was this translation helpful? Give feedback.
All reactions