notpeter / playdate-luacats

LuaCATS for Panic PlaydateSDK API
Apache License 2.0
77 stars 1 forks source link

Request: How can I avoid VSCode underlines when I use table.indexOfElement #5

Closed adamtheturtle closed 7 months ago

adamtheturtle commented 7 months ago

Thank you for this project. It has solved many incorrectly reported type errors for me.

However, when I use table.indexOfElement in VSCode, I still get accessing undefined field 'indexOfElement' of global 'table'. How can I avoid this error?

notpeter commented 7 months ago

Hi,

  1. Which git rev of playdate-luacats are you using (please git pull)
  2. Are you see in this in VSCode or getting that at runtime?
  3. Did you perhaps accidentally create your own variable called table? (overwriting the playdate API provided table global variable)

Otherwise, works for me.

Screenshot 2024-03-21 at 21 20 10 image
adamtheturtle commented 7 months ago

Hi @notpeter .

Apologies! The error was from vscode-luacheck, not from the language server.