TypeScript/tests/cases/fourslash/codeFixAddMissingMember_all.ts
2019-02-22 17:24:21 -08:00

65 lines
1,005 B
TypeScript

/// <reference path='fourslash.ts' />
////class C {
//// method() {
//// this.x = 0;
//// this.y();
//// this.x = "";
//// }
////}
////
////class D extends C {}
////class E extends D {
//// method() {
//// this.x = 0;
//// this.ex = 0;
//// }
////}
////
////class Unrelated {
//// method() {
//// this.x = 0;
//// }
////}
////
////enum En {}
////En.A;
verify.codeFixAll({
fixId: "addMissingMember",
fixAllDescription: "Add all missing members",
newFileContent:
`class C {
x: number;
method() {
this.x = 0;
this.y();
this.x = "";
}
y() {
throw new Error("Method not implemented.");
}
}
class D extends C {}
class E extends D {
ex: number;
method() {
this.x = 0;
this.ex = 0;
}
}
class Unrelated {
x: number;
method() {
this.x = 0;
}
}
enum En {
A
}
En.A;`,
});