Say I have
interface A {
apple?: number;
[key: string]: any;
}
interface B extends A {
banana?: number;
}
I want a type C to extend all from A and all from B except [key: string]: any;. I want a type D to inherit all from B except all from A.
How do I make C and D in typescript?