-
I've got a case where I'm creating a table with special key indexing rules (making it case insensitive). Since I'm developing under Luajit, I'm having to go through some hoops to iterate over the table. To complicate this further, I'm also sorting the keys to return them in alphabetical order. I decided to create a function on the table specifically to return this ordered iterator.
That's all working fine. I'm wanting to better annotate the return so table is typed. When I use the following: the table type annotation is treated as comment. Am I missing something or is this currently unsupported? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Use |
Beta Was this translation helpful? Give feedback.
Use
---@alias ICaseTable table<string, any>
or---@class ICaseTable : { [string]: any }
instead