I believe that would be covariant: `'home' | 'work'` is a subtype of `string`, and `Record<'home' | 'work', number>` is assignable to `Record<string, number>` so the subtype relationship is preserved.
const taskCounts = { work: 10, home: 5, personal: 3 };
const what : Record<string, number> = taskCounts; // OK, covariance?
const the : Record<"work" | "home", number> = taskCounts; // Also OK, contravariance?
const hell : Record<"work" | "home" | "personal" | "hello", number> = taskCounts; // This is an error
https://www.typescriptlang.org/play?#code/MYewdgzgLgBFCGEDWB...