Could someone explain that why is the code below shows error in case if I provide the interface instead of type?
type Obj = Record<string, string>;
class A<T extends Obj> {}
type AsType = {
a: string;
}
// No error
class B extends A<AsType> {}
interface AsInterface {
a: string;
}
// Error
/**
* Type 'AsInterface' does not satisfy the constraint 'Obj'.
* Index signature for type 'string' is missing in type 'AsInterface'.
*/
class C extends A<AsInterface> {}