I have the following code:
const foo = <Key extends keyof any, Value>() {
type Rec = Record<Key, Value>
const a: Rec = {}
}
On the 3rd line typescript given an error that Type '{}' is not assignable to type 'Record<Key, Value>. Why is that happening?