Skip to content

Help type annotation: Nested array of string #1635

Closed Answered by firas-assaad
aspeddro asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aspeddro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants