Repository navigation
Closed
Labels
BugA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestone
Milestone
Description
TypeScript Version:
1.7.5 / 1.8.0-beta / nightly (1.9.0-dev.20160217)
Code
// A self-contained demonstration of the problem follows...
this._register('vscode.diff', (left: URI, right: URI, label: string) => {
return this._commands.executeCommand('_workbench.diff', left, right, label);
}, {
description: 'Opens the provided resources in the diff editor to compare their contents.',
args: [
{ name: 'left', description: 'Uri of the resource for the left hand side of the diff editor', constraint: value => value instanceof URI },
{ name: 'right', description: 'Uri of the resource for the right hand side of the diff editor', constraint: value => value instanceof URI },
{ name: 'label', description: 'Label to use for the diff editor', constraint: value => typeof value === 'string' }
]
});Expected behavior:
- goto ts playground
- paste the code and invoke format
- you get this (note the wrong indent on the last 7 lines):
this._register('vscode.diff', (left: URI, right: URI, label: string) => {
return this._commands.executeCommand('_workbench.diff', left, right, label);
}, {
description: 'Opens the provided resources in the diff editor to compare their contents.',
args: [
{ name: 'left', description: 'Uri of the resource for the left hand side of the diff editor', constraint: value => value instanceof URI },
{ name: 'right', description: 'Uri of the resource for the right hand side of the diff editor', constraint: value => value instanceof URI },
{ name: 'label', description: 'Label to use for the diff editor', constraint: value => typeof value === 'string' }
]
});
Actual behavior:
indent properly
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestone
Activity
saschanaz commentedon Jul 31, 2016
Should be fixed by #3827.
Animeshz commentedon May 10, 2020
Kagami Sascha Rosylight (@saschanaz) issue still persists.
saschanaz commentedon May 10, 2020
Animesh Sahu (@Animeshz) Which TS version do you use? Can you reproduce your issue in https://www.typescriptlang.org/play, and if you can, share it?
RyanCavanaugh commentedon Dec 9, 2020
Seems to be fixed now