-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
π Version & Regression Information
This is the behavior in every version I tried.
β― Playground Link
π» Code
type Id = string & { __tag: 'id '};
type Rec1 = { [key: Id]: number };
type Rec2 = Record<Id, number>;
type K1 = keyof Rec1; // never?
type K2 = keyof Rec2; // Idπ Actual behavior
K1 is never.
π Expected behavior
K1 is Id.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue