Closed
Description
From: microsoft/vscode#25405
TypeScript Version: 2.3.1-insider0425
Code
// @ts-check
const e = new Error();
e.x = 3;
- on
e.x
select theDisable checks in this file quick fix
Expected behavior:
Code becomes:
// @ts-nocheck
const e = new Error();
e.x = 3;
Actual behavior:
An extra new line is added:
// @ts-nocheck
const e = new Error();
e.x = 3;
It seems an extra \n
is returned in the quick fix insert text
{
"description": "Disable checking for this file.",
"changes": [
{
"fileName": "untitled:Untitled-1",
"textChanges": [
{
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 1,
"offset": 13
},
"newText": "// @ts-nocheck\n"
}
]
}
]
}
]