๐ Search Terms
keyof, string, record
๐ Version & Regression Information
- This changed between versions 4.4.4 and 4.5.5
โฏ Playground Link
No response
๐ป Code
type R = { [K in keyof Record<string,unknown> as K]: unknown; };
// ^?
type K = keyof R;
// ^?
let s:string = "a" as K
Workbench Repro
๐ Actual behavior
keyof R is string | number.
๐ Expected behavior
keyof R is string.
Additional information about the issue
No response