4 ms·
This is what happens when you are building rules are around an existing system versus the other way around. In another language you have a value of type String
by WirelessGigabit 4y ago
This is what happens when you are building rules are around an existing system versus the other way around.
In another language you have a value of type String which can take any value, might crash, might not, when you give it a color value.
And then you have a set of items like you described, which are convertible to String (or are a string, like your enum).
In fact, the receiver property probably shouldn't even be String, but typeof Color, which can be constructed through a method/constructor that ensures the String input is a valid format.
Because which color is "XXXXXX"?
- shortrounddev 4y agoIt's also a lot of effort for a language which seems to be incapable of runtime type checking. Typescript is a glorified linter
- 3836293648 4y agoBased on the last time I played with thml colours, probably red
- pvinis 4y ago> This is what happens when you are building rules are around an existing system versus the other way around. exactly right!