Files
tsgo/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.errors.txt

17 lines
587 B
Plaintext

classConstructorAccessibility5.ts(9,21): error TS2674: Constructor of class 'Base' is protected and only accessible within the class declaration.
==== classConstructorAccessibility5.ts (1 errors) ====
class Base {
protected constructor() { }
}
class Derived extends Base {
static make() { new Base() } // ok
}
class Unrelated {
static fake() { new Base() } // error
~~~~~~~~~~
!!! error TS2674: Constructor of class 'Base' is protected and only accessible within the class declaration.
}