I find it really satisfying to nail down type hints for complicated things in dynamically languages. Rust forces you do this upfront (a good thing!) but there's a different satisfaction in succesfully reverse engineering types for an interface provided by someone else's code.

Last night I managed to create type hints for the PlaydateSDK CoreLibs/Object.lua classes. The diff is small, but I'm really proud of it!

https://github.com/notpeter/playdate-luacats/compare/v2.1.0-luacats6..v2.1.0-luacats7

Happy coding!

#playdate #luacats

GitHub - notpeter/playdate-luacats: LuaCATS for Panic PlaydateSDK API

LuaCATS for Panic PlaydateSDK API. Contribute to notpeter/playdate-luacats development by creating an account on GitHub.

GitHub

Proud to announce the release of playdate-luacats! It super-powers VSCode for Playdate Lua development, enabling static analysis, auto-complete and drastically improves Github Copilot predictions too!

I converted the Playdate API to a machine readable format (LuaCATS), manually defined types for ~2000 values and now VSCode (via sumneko.lua extension) can detect errors and offer suggestions while you code.

Give it a whirl!
https://github.com/notpeter/playdate-luacats

#playdate #lua #luacats #vscode #indiedev

GitHub - notpeter/playdate-luacats: LuaCATS for Panic PlaydateSDK API

LuaCATS for Panic PlaydateSDK API. Contribute to notpeter/playdate-luacats development by creating an account on GitHub.

GitHub