Given the enum values are string, a simple array would suffice i.e. config.disallowedColors = [COLOR.RED, COLOR.YELLOW].
When checking, you can leverage includes / some etc. to check if a flag is set e.g.
config.disallowedColors.includes(COLOR.RED);
It gets slightly more complicated when you need to check for multiple values, one option would be to create a temp array for the values you want to check are present, and then leverage every comparing each one to the target array i.e.
const flags = [COLOR.RED, COLOR.YELLOW];
const { disallowedColors } = config;
flags.every(c => disallowedColors.includes(c));
Alternatively, if you used a numerical value then you could leverage Bitwise Operations to create a bit mask which would give you the same result (just in a different way) i.e.
// values should be ^2
enum COLOR {
NONE = 0
RED = 1,
BLUE = 2,
YELLOW = 4,
...
}
...
// setting multiple flags
const colors = COLOR.RED | COLOR.YELLOW;
// check for existence of single flag
const isRed = (colors & COLOR.RED) === COLOR.RED;
// check for existence of multiple flags
const flags = COLOR.RED | COLOR.YELLOW;
const hasMultiple = (colors & flags) === flags;
COLOR[]orArray<COLOR>?