Question: type-safe proxies #8610
Answered
by
beberlei
signor-pedro
asked this question in
Support Questions
-
Hi, I am using psalm heavily and have reached a situation where I can have
All my entities implement the EntityInterface, because I enforce that every entity has a Obviously, my psalm now cries
Is there some adviced way to make Proxies type-safe? Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
beberlei
Apr 8, 2021
Replies: 2 comments
-
Why do you typehint for proxy? You should not need this. Correct typehint is EntityInterface|(EntityInterface&Proxy) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
beberlei
-
Thank you very much- I did not know of the intersection types. |
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
Why do you typehint for proxy? You should not need this.
Correct typehint is EntityInterface|(EntityInterface&Proxy)