Replies: 2 comments 3 replies
-
Same question for scalar: https://psalm.dev/docs/annotating_code/type_syntax/scalar_types/#scalar. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The array-key usefulness is best described with this snippet: https://psalm.dev/r/1a72bb6061 the severity of the issue is not the same when it's an array-key vs string|int scalar may be the same even if i don't see the need for that. It may just be a better way to write string|int|float|bool and that's it |
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
-
https://psalm.dev/docs/annotating_code/type_syntax/scalar_types/#array-key
I am just curious, why
array-key
is defined as supertype but not union? What is the difference in this particular case?Beta Was this translation helpful? Give feedback.
All reactions