TypeScript/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts

34 lines
599 B
TypeScript
Raw Normal View History

/// <reference path='fourslash.ts' />
// @allowJs: true
// @checkJs: true
// @Filename: /a.js
////class C {
//// constructor() {}
//// method() {
//// this.x;
//// this.y();
//// this.x;
//// }
////}
verify.codeFixAll({
fixId: "addMissingMember",
fixAllDescription: "Add all missing members",
newFileContent:
`class C {
2018-01-12 02:43:27 +01:00
constructor() {
this.x = undefined;
}
method() {
this.x;
this.y();
this.x;
}
y() {
throw new Error("Method not implemented.");
}
}`,
});