From d1ad3fad5eed50e23d4371cb4491d115ecf7847e Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Thu, 11 Mar 2021 11:02:32 -0700 Subject: [PATCH] fix(lib/vscode): update storageService getStorage methods This change refactors a lot of the get methods in the storageService. I think it simplies a lot. It removes a bunch of methods. --- .../platform/storage/node/storageService.ts | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/lib/vscode/src/vs/platform/storage/node/storageService.ts b/lib/vscode/src/vs/platform/storage/node/storageService.ts index 330eadb00..3b33b0ba2 100644 --- a/lib/vscode/src/vs/platform/storage/node/storageService.ts +++ b/lib/vscode/src/vs/platform/storage/node/storageService.ts @@ -153,35 +153,8 @@ export class NativeStorageService extends AbstractStorageService { } } -<<<<<<< HEAD - get(key: string, scope: StorageScope, fallbackValue: string): string; - get(key: string, scope: StorageScope): string | undefined; - get(key: string, scope: StorageScope, fallbackValue?: string): string | undefined { - return this.getStorage(scope).get(key, fallbackValue); - } - - getBoolean(key: string, scope: StorageScope, fallbackValue: boolean): boolean; - getBoolean(key: string, scope: StorageScope): boolean | undefined; - getBoolean(key: string, scope: StorageScope, fallbackValue?: boolean): boolean | undefined { - return this.getStorage(scope).getBoolean(key, fallbackValue); - } - - getNumber(key: string, scope: StorageScope, fallbackValue: number): number; - getNumber(key: string, scope: StorageScope): number | undefined; - getNumber(key: string, scope: StorageScope, fallbackValue?: number): number | undefined { - return this.getStorage(scope).getNumber(key, fallbackValue); - } - - protected doStore(key: string, value: string | boolean | number | undefined | null, scope: StorageScope): Promise { - return this.getStorage(scope).set(key, value); - } - - protected doRemove(key: string, scope: StorageScope): void { - this.getStorage(scope).delete(key); -======= protected getStorage(scope: StorageScope): IStorage | undefined { return scope === StorageScope.GLOBAL ? this.globalStorage : this.workspaceStorage; ->>>>>>> e8cd17a97d8c58fffcbac05394b3ee2b3c72d384 } protected getLogDetails(scope: StorageScope): string | undefined {