TypeScript Version: 3.3
Code
typeRecord2<Kextendskeyofany,T>={[PinK]: T;};functiondefaultRecord(x: Record<'a',string>,y: Record<string,string>){x=y;// no error, but error expected.}functioncustomRecord(x: Record2<'a',string>,y: Record2<string,string>){x=y;// no error, but error expected.}functionmixed1(x: Record2<'a',string>,y: Record<string,string>){x=y;// error}functionmixed2(x: Record<'a',string>,y: Record2<string,string>){x=y;// error}Playground Link:link
Related Issues:#28798
TypeScript Version: 3.3
Code
Playground Link:link
Related Issues:#28798