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.
This commit is contained in:
Joe Previte 2021-03-11 11:02:32 -07:00
parent 325f21f73d
commit d1ad3fad5e
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24
1 changed files with 0 additions and 27 deletions

View File

@ -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<void> {
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 { protected getStorage(scope: StorageScope): IStorage | undefined {
return scope === StorageScope.GLOBAL ? this.globalStorage : this.workspaceStorage; return scope === StorageScope.GLOBAL ? this.globalStorage : this.workspaceStorage;
>>>>>>> e8cd17a97d8c58fffcbac05394b3ee2b3c72d384
} }
protected getLogDetails(scope: StorageScope): string | undefined { protected getLogDetails(scope: StorageScope): string | undefined {