Steps to reproduce
interface Table<B> { schema: B; }
interface DerivedTable<S extends DerivedSchema<any, any>> extends Table<S["base"] & S["new"]>{
readonlySchema: Readonly<S["base"] & S["new"]>
}
type DerivedSchema<B, N> = { base: B; new: N };
interface Base { baseProp: number; }
interface New { newProp: boolean; }
declare const source: DerivedTable<{ base: Base, new: New }>
const destination: DerivedTable<{ base: Base; new: New & Base }> = source;
No error
Behavior with tsgo
Error on final line. Reordering the types to have Table be after DerivedTable also gives the same behavior as 5.8
Related to microsoft/TypeScript#62520