Replies: 1 comment 2 replies
-
What about making a union type using ---@class Test
---@field foo string|"bar"
local test = {
hello = "world"
} |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
When I create a table and manually write field values, those values are visible in the class description. But I don't understand how to set them through annotations:
In this example I want to set
foo = "bar"
:The same question I would like to ask about function parameters.
Currently I use such notation for default values:
But it doesn't look as good as the
hello: string = "world"
at the screenshot above.Beta Was this translation helpful? Give feedback.
All reactions