Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion tests/cases/fourslash/codeFixAmbientClassExtendAbstractMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@
//// abstract f(a: number, b: string): this;
//// abstract f(a: string, b: number): Function;
//// abstract f(a: string): Function;
////
//// abstract f1(this: A): number;
//// abstract f2(this: A, a: number, b: string): number;
////
//// abstract foo(): number;
////}
////
////declare class C extends A {}

verify.codeFix({
description: "Implement inherited abstract class",
description: ts.Diagnostics.Implement_inherited_abstract_class.message,
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;

abstract f1(this: A): number;
abstract f2(this: A, a: number, b: string): number;

abstract foo(): number;
}

Expand All @@ -26,6 +34,8 @@ declare class C extends A {
f(a: number, b: string): this;
f(a: string, b: number): Function;
f(a: string): Function;
f1(this: A): number;
f2(this: A, a: number, b: string): number;
foo(): number;
}`
});