interface X {
b: T extends Foo; // псевдокод
}
interface Foo { a: number; }
interface Bar extends Foo { b?: number; }
interface Baz extends Foo { c: number; }
class B implements Bar { /* interface release */ }
class C implements Baz { /* interface release */ }
interface X { instance: Bar; }
{ instance: new C() } as X;