mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
853 B
Plaintext
19 lines
853 B
Plaintext
classAbstractMethodInNonAbstractClass.ts(2,5): error TS1244: Abstract methods can only appear within an abstract class.
|
|
classAbstractMethodInNonAbstractClass.ts(6,5): error TS1244: Abstract methods can only appear within an abstract class.
|
|
classAbstractMethodInNonAbstractClass.ts(6,14): error TS1245: Method 'foo' cannot have an implementation because it is marked abstract.
|
|
|
|
|
|
==== classAbstractMethodInNonAbstractClass.ts (3 errors) ====
|
|
class A {
|
|
abstract foo();
|
|
~~~~~~~~
|
|
!!! error TS1244: Abstract methods can only appear within an abstract class.
|
|
}
|
|
|
|
class B {
|
|
abstract foo() {}
|
|
~~~~~~~~
|
|
!!! error TS1244: Abstract methods can only appear within an abstract class.
|
|
~~~
|
|
!!! error TS1245: Method 'foo' cannot have an implementation because it is marked abstract.
|
|
} |