🔎 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
🔎 Search Terms
keyof, string, record
🕗 Version & Regression Information
⏯ Playground Link
No response
💻 Code
Workbench Repro
🙁 Actual behavior
keyof Risstring | number.🙂 Expected behavior
keyof Risstring.Additional information about the issue
No response