-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
Has ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosThis issue has compiler-backed repros: https://aka.ms/ts-reprosNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
Description
π 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
π Actual behavior
keyof R
is string | number
.
π Expected behavior
keyof R
is string
.
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
Has ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosThis issue has compiler-backed repros: https://aka.ms/ts-reprosNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.