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
functionextend<T,U>(base: T,ext: U): T&U{constretval=<T&U>{};for(constxinbase){// Error: Type 'T[keyof T]' is not assignable to type '(T & U)[keyof T]'.retval[x]=base[x];}for(constxinext){// Error: Type 'U[keyof U]' is not assignable to type '(T & U)[keyof U]'.retval[x]=ext[x];}returnretval;}
TypeScript Version: nightly
The following used to work but is broken now.
Code