Why isn't this code snippet functioning as expected? It seems that 'beta' has keys of type string and their values are compatible (id is a number type, and temp is also a number type). Additionally, the Record function should make the values of all keys any, which should be compatible with everything.
const alpha: Record<string, any> = {
id: 1,
temp: 2
};
const beta : {
id: number;
temp: number
} = alpha;
So why does it produce this error message?
Type 'Record<string, any>' is missing the following properties from type '{ id: number; temp: number; }': id, temp