TypeScript/tests/baselines/reference/abstractProperty.types
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

63 lines
996 B
Plaintext

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