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
This is using the latest release-2.1 branch. I'm unclear why types B & C would behave differently below when it comes to object rest members, so I am assuming this is a bug. (ping @sandersn & @mhegazy ).
interfaceA{name: string;age: number;}interfaceBextendsA{address: string;}typeC=A&{address: string};// Both v1 & v2 appear to have the same members...varv1: B;varv2: C;// ... and assignment in either direction is finev1=v2;// OKv2=v1;// OK// let {name, ...x2} = v1; // This line is valid (when uncommented)let{name, ...x3}=v2;// This line gives the error: Rest types may only be created from object types.
This is using the latest release-2.1 branch. I'm unclear why types B & C would behave differently below when it comes to object rest members, so I am assuming this is a bug. (ping @sandersn & @mhegazy ).