Annotate Type of Return Statement #1656
firas-assaad
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Did you ever figure this out? I have hit this same wall and I can't find a working solution other than create and export |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have module Lua files with data in a structured format, and I'd like to explicitly annotate the returned value. I tried the following:
This doesn't result in any checking of the return type. Instead, I can annotate a local variable and return it:
Using a local variable isn't a big deal, but it forces me to structure code differently just to accommodate the language server. It would be nice if it understood the annotation before the return statement.
Beta Was this translation helpful? Give feedback.
All reactions