You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a subset of enums that are part of a larger set of enums. I wrote some code that where users could register custom handling around some of the types used by the system, and had to keep track of those types separately (but they did need to align with the main set of enums).
An example (to hopefully clear things up a bit):
-- options used in configuration, but need to be a string from TomlType
local enum TomlConversionType
"datetime-local"
"datetime"
"date-local"
"time-local"
end
local enum TomlType
"string"
"integer"
"float"
"bool"
"datetime"
"datetime-local"
"date-local"
"time-local"
end
Potential syntax: local enum TomlConversionType is TomlType (indicating that any values within TomlConversionType have to be a TomlType as well)
Maybe an odd idea, and curious if others would have any potential uses for it.
The text was updated successfully, but these errors were encountered:
Having a subset of enums that are part of a larger set of enums. I wrote some code that where users could register custom handling around some of the types used by the system, and had to keep track of those types separately (but they did need to align with the main set of enums).
An example (to hopefully clear things up a bit):
Potential syntax:
local enum TomlConversionType is TomlType
(indicating that any values withinTomlConversionType
have to be aTomlType
as well)Maybe an odd idea, and curious if others would have any potential uses for it.
The text was updated successfully, but these errors were encountered: