21 lines
No EOL
698 B
Text
21 lines
No EOL
698 B
Text
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();
|
|
}
|
|
} |