TypeScript/tests/cases/fourslash/codeFixAddMissingMember9.ts
Andrew Branch 797c5362a2
Codefix: Don’t return a fixId if there’s definitely nothing else that can be fixed (#35765)
* Start fixing fixId

* Fix tests

* Add comment

* Fix unit tests, remove fixAllDescription when unavailable

* Add codeFixAllAvailable to fourslash harness
2020-01-16 10:07:37 -08:00

26 lines
544 B
TypeScript

/// <reference path='fourslash.ts' />
////class C {
//// z: boolean = true;
//// method() {
//// const x = 0;
//// this.y(x, "a", this.z);
//// }
////}
verify.codeFix({
index: 0,
description: ignoreInterpolations(ts.Diagnostics.Declare_method_0),
newFileContent:
`class C {
z: boolean = true;
method() {
const x = 0;
this.y(x, "a", this.z);
}
y(x: number, arg1: string, z: boolean) {
throw new Error("Method not implemented.");
}
}`,
});