TypeScript/tests/cases/fourslash/codeFixAddMissingMember4.ts
2018-01-17 15:29:41 -08:00

27 lines
470 B
TypeScript

/// <reference path='fourslash.ts' />
// @checkJs: true
// @allowJs: true
// @Filename: a.js
////class C {
//// constructor() {
//// }
//// method() {
//// this.foo === 10;
//// }
////}
verify.codeFix({
description: "Initialize property 'foo' in the constructor",
index: 0,
newFileContent: `class C {
constructor() {
this.foo = undefined;
}
method() {
this.foo === 10;
}
}`
});