Help type annotation: Nested array of string #1635
-
How is this type defined? local args = {'--color', {'--filter', 'path/to/lua.lua'} } |
Beta Was this translation helpful? Give feedback.
Answered by
firas-assaad
Oct 17, 2022
Replies: 1 comment
-
If it's just this example: ---@type { [1]: string, [2]: { [1]: string, [2]: string } }
-- or
---@type { [1]: string, [2]: string[] } If it's something more generic, maybe: ---@type (string|string[])[] Or you could use aliases |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
aspeddro
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If it's just this example:
If it's something more generic, maybe:
---@type (string|string[])[]
Or you could use aliases