Remove TS 3.7 protocol workaround

This commit is contained in:
Matt Bierner 2020-02-26 16:03:40 -08:00
parent 027da88563
commit e4beca6b31

View file

@ -145,9 +145,7 @@ export default class FileConfigurationManager extends Disposable {
isTypeScriptDocument(document) ? 'typescript.format' : 'javascript.format',
document.uri);
// `semicolons` added to `Proto.FormatCodeSettings` in TypeScript 3.7:
// remove intersection type after upgrading TypeScript.
const settings: Proto.FormatCodeSettings & { semicolons?: string } = {
return {
tabSize: options.tabSize,
indentSize: options.tabSize,
convertTabsToSpaces: options.insertSpaces,
@ -170,8 +168,6 @@ export default class FileConfigurationManager extends Disposable {
placeOpenBraceOnNewLineForControlBlocks: config.get<boolean>('placeOpenBraceOnNewLineForControlBlocks'),
semicolons: config.get<Proto.SemicolonPreference>('semicolons'),
};
return settings;
}
private getPreferences(document: vscode.TextDocument): Proto.UserPreferences {