love2d-community / love-api

The whole LÖVE wiki in a Lua table.
http://love2d-community.github.io/love-api/
299 stars 46 forks source link

Detailed Type Information for Tables and Functions #114

Closed MikuAuahDark closed 3 months ago

MikuAuahDark commented 1 year ago

This will be useful for type annotations that, for example, supports array tables, annotated function return type, etc.

MikuAuahDark commented 5 months ago

Here are currently my proposals for additional fields:

Do note that arraytype = anything and tabletype = {'number', anything} are not equal. The former assumes linear arrays without holes while the latter can contain holes (or even non-integers). That's why they're separated.

I'll probably start working on this anytime soon, if I didn't forgot.