mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
21 lines
894 B
Plaintext
21 lines
894 B
Plaintext
errorInUnnamedClassExpression.ts(5,14): error TS2715: Abstract property 'bar' in class 'Foo' cannot be accessed in the constructor.
|
|
errorInUnnamedClassExpression.ts(7,5): error TS1253: Abstract properties can only appear within an abstract class.
|
|
errorInUnnamedClassExpression.ts(7,14): error TS7008: Member 'bar' implicitly has an 'any' type.
|
|
|
|
|
|
==== errorInUnnamedClassExpression.ts (3 errors) ====
|
|
// https://github.com/microsoft/TypeScript/issues/62920
|
|
|
|
let Foo = class {
|
|
constructor() {
|
|
this.bar++;
|
|
~~~
|
|
!!! error TS2715: Abstract property 'bar' in class 'Foo' cannot be accessed in the constructor.
|
|
}
|
|
abstract bar;
|
|
~~~~~~~~
|
|
!!! error TS1253: Abstract properties can only appear within an abstract class.
|
|
~~~
|
|
!!! error TS7008: Member 'bar' implicitly has an 'any' type.
|
|
};
|
|
|