How do you add type annotations to global variables? #1356
Unanswered
DavidColson
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With the following example:
myglobal: number = 0
this gives the error:
Expected '(', '{' or <string> when parsing function call, got '='
Which is to be expected really, it assumes this will be a function call. But I wonder then if you can annotate globals at all?
Beta Was this translation helpful? Give feedback.
All reactions