TypeScript/tests/cases/fourslash/codeFixForgottenThisPropertyAccessECMAPrivate.ts
Andrew Branch eac2180e40
Be more tolerant with private identifier parsing, issue more targeted errors, and support private identifiers in forgotten 'this' codefix (#36188)
* Support private identifiers in forgotten this codefix

* Parse invalid private identifiers as identifiers and issue targeted errors

* Update codefix

* Remove accidentally deleted newline
2020-01-22 13:41:15 -08:00

23 lines
317 B
TypeScript

/// <reference path="fourslash.ts" />
////class K {
//// #value: number;
////
//// foo() {
//// #value/**/;
//// }
////}
verify.codeFix({
index: 0,
description: "Add 'this.' to unresolved variable",
newFileContent:
`class K {
#value: number;
foo() {
this.#value;
}
}`
});