TypeScript/tests/cases/fourslash/codeFixAddMissingMember6.ts

23 lines
438 B
TypeScript
Raw Normal View History

2017-03-14 06:49:54 +01:00
/// <reference path='fourslash.ts' />
// @checkJs: true
// @allowJs: true
// @Filename: a.js
////class C {
2017-03-14 06:49:54 +01:00
//// constructor() {
//// }
//// prop = ()=>{ this.foo === 10 };
////}
2017-03-14 06:49:54 +01:00
verify.codeFix({
description: "Initialize property 'foo' in the constructor",
index: 0,
newFileContent: `class C {
2018-01-12 02:43:27 +01:00
constructor() {
this.foo = undefined;
}
2017-03-14 06:49:54 +01:00
prop = ()=>{ this.foo === 10 };
}`
});