-
-
Notifications
You must be signed in to change notification settings - Fork 51
Add support for conditional types, offset access types and key-of, value-of, int-mask, int-mask-of
#225
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
Conversation
|
I do not want to expose the internal used parser nodes as they are hard to work with. |
|
Okay, I'll get on it. |
|
Tnx, you might want to have a look at how the other pseudo types are implemented. Maybe we need to remove the final keyword from the mixed type. |
TypeNode property to Mixed_key-of, value-of, int-mask, int-mask-of
key-of, value-of, int-mask, int-mask-ofkey-of, value-of, int-mask, int-mask-of
|
Done. Please take a look |
|
By the way, it's very inconvenient to fix the code style, because Codesniffer is not installed in the repository itself. It's very difficult to understand where the error occurred. |
|
Can you make sure your new types do extend the For the rests this is very nice. Thanks a lot! |
|
Done. The types |
jaapio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few suggestions to make the implementation complete. After that we can merge this an tag a new release.
Thanks for all your efforts!
|
Done. Thank you for your quick response. |
|
I want to add another feature. Can we merge it so we don't have to deal with merge conflicts later? |
Problem
In https://github.com/yiisoft/yii2-apidoc, we want to handle all possible PHPStan/Psalm types. Currently, this is quite difficult to do, as some types are replaced with
Mixed_.Solution
I propose storing the original
TypeNodeinMixed_so that the type can be restored later.