- Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
when indexing into a mapped type using a key that is constraint to the same constraint type, indexing should be allowed. consider:
typeOptional<T>={[KinkeyofT]?: T[K]};functionsetFromOther<T,KextendskeyofT>(obj: T,k: K,other: Optional<T>){obj[k]=other[k];// K is not constraint to keyof Optional<T>}Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue