TypeScript/tests/cases/compiler/abstractProperty.ts

22 lines
538 B
TypeScript
Raw Normal View History

//@target: ES5
interface A {
prop: string;
raw: string;
m(): void;
}
abstract class B implements A {
abstract prop: string;
abstract raw: string;
abstract readonly ro: string;
abstract get readonlyProp(): string;
abstract set readonlyProp(val: string);
abstract m(): void;
}
class C extends B {
get prop() { return "foo"; }
set prop(v) { }
raw = "edge";
readonly ro = "readonly please";
readonlyProp: string; // don't have to give a value, in fact
m() { }
}