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

23 lines
438 B
TypeScript

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