Here is my code snippet:
const foo = <Key extends keyof any, Value>() {
type Rec = Record<Key, Value>
const a: Rec = {}
}
When I try to compile this code, TypeScript throws an error on the 3rd line stating that
Type '{}' is not assignable to type 'Record<Key, Value>
. What could be causing this issue?