TypeScript/tests/cases/compiler/abstractProperty.ts
Nathan Shively-Sanders 02fc8b1b2d Add abstract property tests and rebaseline.
1. Positive tests.
2. Negative tests.
3. Update error messages.
4. Remove errors from conformance test.
2016-02-22 10:31:31 -08:00

22 lines
538 B
TypeScript

//@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() { }
}