Type checking not working across scopes #2351
Answered by
carsakiller
Sep 29, 2023
Replies: 2 comments
|
The language server is treating You can mark the type of ---@type playdate.graphics.sprite
local playerSprite = nil |
0 replies
Answer selected by
Peter-Oestergaard
|
Thanks. That's what I needed. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



The language server is treating
playerSpriteas eitherplaydate.graphics.spriteornil, because, like you said, the setup function theoretically could not run.You can mark the type of
playerSpriteasplaydate.graphics.spriteat its definition: