You could just change the declaration of KeyToVal like this:
const KeyToVal = {
MyKey1: 'myValue1',
MyKey2: 'myValue2',
} as const; // <----- add the <as const> here
Then you can create the key types:
type Keys = keyof typeof KeyToVal;
Now you can create the types of values:
type ValuesTypes = typeof KeyToVal[Keys];