typescript@2.8.0-dev.20180126
Code
class Foo {
private x: string = ''
bar() {
// comment
x.toString()
}
}
Trigger quick fix to add missing this. on x
Expected behavior:
class Foo {
private x: string = ''
bar() {
// comment
this.x.toString()
}
}
Actual behavior:
class Foo {
private x: string = ''
a() {
this.
// comment
x.toString()
}
}
[Trace - 20:24:49] Response received: getCodeFixes (72). Request took 2 ms. Success: true
Result: [
{
"description": "Add 'this.' to unresolved variable",
"changes": [
{
"fileName": "untitled:^Untitled-1",
"textChanges": [
{
"start": {
"line": 5,
"offset": 1
},
"end": {
"line": 6,
"offset": 10
},
"newText": " this.\n // comment\n x"
}
]
}
],
"fixId": "forgottenThisPropertyAccess"
}
]
typescript@2.8.0-dev.20180126
Code
Trigger quick fix to add missing
this.onxExpected behavior:
Actual behavior: