New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADT / tagged union emulation? #8340
Comments
Hey @someniatko, can you reproduce the issue on https://psalm.dev ? |
We have type aliases for that, though admittedly they could use some improvement. I swear this has come up before, but I can't find anything right now. |
|
See #1450 |
Oh, thank you, that's a duplicate then! |
I'd like to mark somehow that my abstract class, or an interface, has only a restricted set of available extenders / implementers.
This can also be achieved on a language level by further extension of the enum concept as Larry Garfield planned. Also, another option is to use a union type, but it's too cumbersome to type each time.
The text was updated successfully, but these errors were encountered: