How to annotate module types #836
Unanswered
bryanforbes
asked this question in
Q&A
Replies: 2 comments 8 replies
-
When parsing the code, |
Beta Was this translation helpful? Give feedback.
1 reply
-
Is it still (3 years later) so difficult to add a way completion of module names? It's possible for |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a function similar to this:
Annotating
moduleName
andstatus
is simple enough, however annotatingmod
, the return type, andthing
seem to be much harder:Let's look at the two variables:
mod
, if the value ofmoduleName
was known, it could be annotated as---@module 'valueOfModuleName'
. Is there a way to dynamically pass a value to@module
today?thing
, I don't see a way to annotate a variable as a@module
or another type, which would allow me to ignore the dynamic@module
formod
and set the return value ofreq
toany
.For the return type, I don't see a way to do any of these:
@module
@module
or another value@module
based on some computed value (as pointed out above)Perhaps I'm just missing how to do all of this, so any help is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions