mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 11:11:30 +03:00
13 lines
188 B
TypeScript
13 lines
188 B
TypeScript
class Base {
|
|
foo() { return 1; }
|
|
static create() {
|
|
return new this();
|
|
}
|
|
}
|
|
|
|
class Derived extends Base {
|
|
foo() { return 2; }
|
|
}
|
|
var d = Derived.create();
|
|
|
|
d.foo();
|