How to add type for io.open
returned value?
#2254
Unanswered
linrongbin16
asked this question in
Q&A
Replies: 1 comment 1 reply
-
When I use your example, I do not receive any warnings and the types are as expected: Try reloading your workspace, maybe it is just a glitch. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I want to write code like this:
But in the line-3, lua ls report:
What type should I use to add
@as
annotation forf
?I have tried
--[[@as file]]
, but it seems not the correct annotation for io.file.Beta Was this translation helpful? Give feedback.
All reactions