TypeScript/tests/cases/fourslash/codeFixForgottenThisPropertyAccess_all.ts
Andy a7c08e4691
Make code fix to add 'this.' work for statics (#23527)
* Make code fix to add 'this.' work for statics

* Add 'C.' instead of 'this.'

* DanielRosenwasser code review
2018-04-19 15:39:44 -07:00

23 lines
400 B
TypeScript

/// <reference path='fourslash.ts' />
////class C {
//// foo: number;
//// m() {
//// foo;
//// foo;
//// }
////}
verify.codeFixAll({
fixId: "forgottenThisPropertyAccess",
fixAllDescription: "Add qualifier to all unresolved variables matching a member name",
newFileContent:
`class C {
foo: number;
m() {
this.foo;
this.foo;
}
}`,
});