21 lines
698 B
Plaintext
21 lines
698 B
Plaintext
tests/cases/compiler/genericTypeConstraints.ts(9,31): error TS2344: Type 'FooExtended' does not satisfy the constraint 'Foo'.
|
|
Property 'fooMethod' is missing in type 'FooExtended'.
|
|
|
|
|
|
==== tests/cases/compiler/genericTypeConstraints.ts (1 errors) ====
|
|
class Foo {
|
|
fooMethod() {}
|
|
}
|
|
|
|
class FooExtended { }
|
|
|
|
class Bar<T extends Foo> { }
|
|
|
|
class BarExtended extends Bar<FooExtended> {
|
|
~~~~~~~~~~~
|
|
!!! error TS2344: Type 'FooExtended' does not satisfy the constraint 'Foo'.
|
|
!!! error TS2344: Property 'fooMethod' is missing in type 'FooExtended'.
|
|
constructor() {
|
|
super();
|
|
}
|
|
} |