You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>}
The text was updated successfully, but these errors were encountered:
This is fixed by #12351. However, in --strictNullChecks mode the example above still errors because T[K] | undefined is not assignable to T[K], but that's to be expected.
when indexing into a mapped type using a key that is constraint to the same constraint type, indexing should be allowed. consider:
The text was updated successfully, but these errors were encountered: