Revert "Revert "Merge from vscode ada4bddb8edc69eea6ebaaa0e88c5f903cbd43d8 (#5529)" (#5553)" (#5562)

This reverts commit c9a4f8f664.
This commit is contained in:
Anthony Dresser
2019-05-21 14:19:32 -07:00
committed by GitHub
parent 7670104e4d
commit 81ae86ff79
325 changed files with 4497 additions and 3328 deletions

View File

@@ -666,7 +666,7 @@ class CachedFolderConfiguration extends Disposable implements IFolderConfigurati
private readonly configurationCache: IConfigurationCache
) {
super();
this.key = createSHA1(join(folder.path, configFolderRelativePath)).then(key => (<ConfigurationKey>{ type: 'folder', key }));
this.key = createSHA1(join(folder.path, configFolderRelativePath)).then(key => ({ type: 'folder', key }));
this.configurationModel = new ConfigurationModel();
}

View File

@@ -396,7 +396,7 @@ export class WorkspaceService extends Disposable implements IConfigurationServic
}
private compareFolders(currentFolders: IWorkspaceFolder[], newFolders: IWorkspaceFolder[]): IWorkspaceFoldersChangeEvent {
const result = { added: [], removed: [], changed: [] } as IWorkspaceFoldersChangeEvent;
const result: IWorkspaceFoldersChangeEvent = { added: [], removed: [], changed: [] };
result.added = newFolders.filter(newFolder => !currentFolders.some(currentFolder => newFolder.uri.toString() === currentFolder.uri.toString()));
for (let currentIndex = 0; currentIndex < currentFolders.length; currentIndex++) {
let currentFolder = currentFolders[currentIndex];