2016-11-29 21:33:20 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2017-12-07 21:14:18 +01:00
|
|
|
////abstract class A {
|
|
|
|
//// abstract get a(): string;
|
|
|
|
//// abstract set a(newName: string);
|
|
|
|
////
|
|
|
|
//// abstract get b(): number;
|
|
|
|
////
|
|
|
|
//// abstract set c(arg: number | string);
|
|
|
|
////}
|
|
|
|
////
|
|
|
|
////class C implements A {}
|
|
|
|
|
|
|
|
verify.codeFix({
|
|
|
|
description: "Implement interface 'A'",
|
|
|
|
newFileContent:
|
|
|
|
`abstract class A {
|
|
|
|
abstract get a(): string;
|
|
|
|
abstract set a(newName: string);
|
|
|
|
|
|
|
|
abstract get b(): number;
|
|
|
|
|
|
|
|
abstract set c(arg: number | string);
|
|
|
|
}
|
2016-11-29 21:33:20 +01:00
|
|
|
|
2018-01-12 02:43:27 +01:00
|
|
|
class C implements A {
|
2019-08-10 01:11:25 +02:00
|
|
|
get a(): string {
|
|
|
|
throw new Error("Method not implemented.");
|
|
|
|
}
|
|
|
|
set a(newName: string) {
|
|
|
|
throw new Error("Method not implemented.");
|
|
|
|
}
|
|
|
|
get b(): number {
|
|
|
|
throw new Error("Method not implemented.");
|
|
|
|
}
|
|
|
|
set c(arg: string | number) {
|
|
|
|
throw new Error("Method not implemented.");
|
|
|
|
}
|
2017-12-07 21:14:18 +01:00
|
|
|
}`,
|
|
|
|
});
|