Lua type annotation file for the SDK


@balpha if you were to share the tool you use to build the file and provide instructions for how to use it, would that change anything?

That way, you wouldn’t be distributing anything that’s not your own work. It might still be considered a derived work though.

@balpha We've discussed this at Panic and we give you express written permission to distribute this file. Thanks for the work, it will be very helpful to a lot of folks! :slight_smile:


Thank you @willco, that's great news!

I've now made the repository public: GitHub - balpha/playdate-types: Type annotations for the Playdate Lua SDK

(The generator code, for anyone curious, is at GitHub - balpha/playdate-types-generator)


Just started using these annotations and they're life-changing! Thank you so much @balpha :pray:t3:
@willco would it be possible to have them directly in the SDK, so that they would be immediately accessible to everyone using it? Rather than having to dig into the forum to find this post :sweat_smile: If @balpha is ok with it of course!


We've talked about adding these directly to the SDK but aren't quite ready to commit more resources to VS Code. :slight_smile: We do realize it's a popular editor but we are a very small team.

The annotations aren't just for VS code! The Lua language server is a standard used by many editors. It would be really great to have proper annotations.


Good point. There are 10s of them. :slight_smile: