Replies: 1 comment 3 replies
-
Hello, how do yo understand the purpose of
Looks like that when the object isn't But your use-case is different. Can you describe it in more detail? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm trying to contribute to a library with a new method of a class with a generic.
If this method is called, the object's generic is a tuple of two known values, and we will want to return both values.
This library is currently psalm-only compliant, although I've made some contributions to improve the compatibility with PHPStan from a library consumer PoV. In psalm annotations, I think I've been able to achieve what we want: https://psalm.dev/r/b7e175d161
But in PHPStan I can't find a way to tell the static analysis how to hydrate the templates of the
unzip
method: https://phpstan.org/r/43878041-d2c6-4be6-aa1a-545fed407c9eIs there any other way to type this, or is it just a missing feature for now?
Beta Was this translation helpful? Give feedback.
All reactions