11 lines
190 B
TypeScript
11 lines
190 B
TypeScript
|
class Base {
|
||
|
protected constructor() { }
|
||
|
}
|
||
|
class Derived extends Base {
|
||
|
static make() { new Base() } // ok
|
||
|
}
|
||
|
|
||
|
class Unrelated {
|
||
|
static fake() { new Base() } // error
|
||
|
}
|