-
-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Req] —-@enum
#1255
Comments
This is happening because you're assigning a parameter — that you defined as Realm type — to a field of Take a look into the |
I could do this:
but thats not really a solution |
Enums are most easily annotated as This makes it possible to write functions that take If that doesn't work you may need to explain a bit more about what you are trying to accomplish with this |
would be nice if we could use sth like |
You can make that an alias and use the alias as the param type
…On Wed, Jun 29, 2022, 4:43 PM FlashHit ***@***.***> wrote:
[image: grafik]
<https://user-images.githubusercontent.com/56718716/176540941-598e337b-1407-4c7e-b2d1-b68d53fa2f95.png>
well this doesn't look nice. it not optimal imo
—
Reply to this email directly, view it on GitHub
<#1255 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKTFYG6IMPCTHZC2PDB5CDVRSYQ3ANCNFSM52G4G34Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
thats what I did |
---@enum Realm --> Equivalent to ---@alias Realm Realm.Realm_Client|Realm.Realm_Server|...
local Realm = {
Realm_Client = 0, --> type: Realm.Realm_Client
Realm_Server = 1, --> type: Realm.Realm_Server
Realm_ClientAndServer = 2,
Realm_None = 3,
Realm_Pipeline = 4,
}
---@param p_Realm Realm?
function Test(p_Realm)
p_Realm = Realm.Realm_Client
end proposal of |
Yes please 👍 |
please add this to the next milestone :) |
When this is ready for testing feel free to @ me and I can work on adding a description for it like I did back in e2b791e |
how do i do this?
The text was updated successfully, but these errors were encountered: