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
We're not able to enforce type constraints on config providers themselves, but from an end-user perspective it'd be useful to be able to model config items as enums straight out of the box. By default the mapping would be to and from the enum "value", making use of Enum Generics.
An example of how this might look:
enumclassThemeAccent {
LightBlue,
BrightGreen
}
// in SubConfig implementationval themeAccent by config<ThemeAccent>()
Implementation-wise, the delegate function can be selected via overload resolution. An implementation such as this should suffice:
We're not able to enforce type constraints on config providers themselves, but from an end-user perspective it'd be useful to be able to model config items as enums straight out of the box. By default the mapping would be to and from the enum "value", making use of Enum Generics.
An example of how this might look:
Implementation-wise, the delegate function can be selected via overload resolution. An implementation such as this should suffice:
The text was updated successfully, but these errors were encountered: