mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 15:12:08 +03:00
17 lines
280 B
TypeScript
17 lines
280 B
TypeScript
// @target: es2015,esnext
|
|
// @useDefineForClassFields: true
|
|
abstract class A {
|
|
protected abstract x: string;
|
|
public foo() {
|
|
console.log(this.x);
|
|
}
|
|
}
|
|
|
|
class B extends A {
|
|
protected x = 'B.x';
|
|
}
|
|
|
|
class C extends A {
|
|
protected get x() { return 'C.x' };
|
|
}
|