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
typeFoo<IdentifierTextendsRecord<PropertyKey,PropertyKey>>=IdentifierT;typeBar<IdentifierTextendsRecord<PropertyKey,PropertyKey>,T>={[kinkeyofT] : Foo<IdentifierT&{k : k}>};typeMerge2<T>={[kinkeyofT] : T[k]}typeBar2<IdentifierTextendsRecord<PropertyKey,PropertyKey>,T>={[kinkeyofT]: Foo<Merge2<IdentifierT&{k: k}>>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// Works in 3.5.1// Works in 3.6.3// Works in 3.7.5// Fails in 3.8.3};typeIdentity<T>=T;typeMerge3<T>=Identity<{[kinkeyofT] : T[k]}>typeBar3<IdentifierTextendsRecord<PropertyKey,PropertyKey>,T>={[kinkeyofT]: Foo<Merge3<IdentifierT&{k: k}>>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// Works in 3.5.1// Works in 3.6.3// Works in 3.7.5// Fails in 3.8.3};
TypeScript Version: 3.8.3
Search Terms:
no-op mapped type, assignable
Code
Expected behavior:
Passes type checking
Actual behavior:
Fails in TS 3.8.3
Playground Link:
Playground
Related Issues:
Not that I could find
Well, it isn't exactly a "no-op" mapped type.
It will strip call and constructor signatures, but "no-op mapped type" was the best name I had for it.
The text was updated successfully, but these errors were encountered: