Is there a way to contruct a type that will allow any kind of keys for object as long as they are UPPERCASE?
I want this to pass:
const example: OnlyUppercaseKeys = {
TEST: 'any string',
TEST_ME: 'any string'
};
and I want this to fail:
const example: OnlyUppercaseKeys = {
Test: 'any string',
'test_me': 'any string'
};
I know there are string manipulation types. I can even use them to construct a type that will convert any keys to uppercase, but I don't know how to write type with a test that would check it in Record<???, string>