how can I create a named-key array type? #8337
kkmuffme
started this conversation in
Plugin development
Replies: 1 comment 5 replies
|
https://psalm.dev/docs/running_psalm/plugins/plugins_type_system/#arrays You want new TKeyedArray([
"name" => new Union([
new TString(),
new TList(new Union([new TString()])),
]),
"type" => new Union([new TInt()]),
]); |
5 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.
I know for
array<non-empty-string, int|string|list<string>>I can do:However I wasn't able to find an example for when I have this:
Could someone quickly guide me/point towards an example?
All reactions