2019-08-10 01:11:25 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
////abstract class A {
|
|
|
|
//// abstract f(a: number, b: string): boolean;
|
|
|
|
//// abstract f(a: number, b: string): this;
|
|
|
|
//// abstract f(a: string, b: number): Function;
|
|
|
|
//// abstract f(a: string): Function;
|
2020-07-08 21:36:42 +02:00
|
|
|
////
|
|
|
|
//// abstract f1(this: A): number;
|
|
|
|
//// abstract f2(this: A, a: number, b: string): number;
|
|
|
|
////
|
2019-08-10 01:11:25 +02:00
|
|
|
//// abstract foo(): number;
|
|
|
|
////}
|
|
|
|
////
|
|
|
|
////declare class C extends A {}
|
|
|
|
|
|
|
|
verify.codeFix({
|
2020-07-08 21:36:42 +02:00
|
|
|
description: ts.Diagnostics.Implement_inherited_abstract_class.message,
|
2019-08-10 01:11:25 +02:00
|
|
|
newFileContent:
|
|
|
|
`abstract class A {
|
|
|
|
abstract f(a: number, b: string): boolean;
|
|
|
|
abstract f(a: number, b: string): this;
|
|
|
|
abstract f(a: string, b: number): Function;
|
|
|
|
abstract f(a: string): Function;
|
2020-07-08 21:36:42 +02:00
|
|
|
|
|
|
|
abstract f1(this: A): number;
|
|
|
|
abstract f2(this: A, a: number, b: string): number;
|
|
|
|
|
2019-08-10 01:11:25 +02:00
|
|
|
abstract foo(): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare class C extends A {
|
|
|
|
f(a: number, b: string): boolean;
|
|
|
|
f(a: number, b: string): this;
|
|
|
|
f(a: string, b: number): Function;
|
|
|
|
f(a: string): Function;
|
2020-07-08 21:36:42 +02:00
|
|
|
f1(this: A): number;
|
|
|
|
f2(this: A, a: number, b: string): number;
|
2019-08-10 01:11:25 +02:00
|
|
|
foo(): number;
|
|
|
|
}`
|
|
|
|
});
|