tl
tl copied to clipboard
Feature Request: subset of enums as an enum
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.