mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 17:23:02 -05:00
strict null for contrib/preferences and contrib/configuration (#11915)
This commit is contained in:
@@ -31,8 +31,8 @@ const settingsToMove: { [key: string]: string } = deepFreeze({
|
||||
export class ConfigurationUpgraderContribution implements IWorkbenchContribution {
|
||||
|
||||
private static readonly STORAGE_KEY = 'configurationUpgrader';
|
||||
private readonly globalStorage: { [key: string]: boolean };
|
||||
private readonly workspaceStorage: { [key: string]: boolean };
|
||||
private readonly globalStorage: { [key: string]: boolean } = JSON.parse(this.storageService.get(ConfigurationUpgraderContribution.STORAGE_KEY, StorageScope.GLOBAL, '{}'));
|
||||
private readonly workspaceStorage: { [key: string]: boolean } = JSON.parse(this.storageService.get(ConfigurationUpgraderContribution.STORAGE_KEY, StorageScope.WORKSPACE, '{}'));
|
||||
|
||||
public readonly processingPromise: Promise<void>;
|
||||
|
||||
@@ -41,8 +41,6 @@ export class ConfigurationUpgraderContribution implements IWorkbenchContribution
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@INotificationService private readonly notificationService: INotificationService
|
||||
) {
|
||||
this.globalStorage = JSON.parse(this.storageService.get(ConfigurationUpgraderContribution.STORAGE_KEY, StorageScope.GLOBAL, '{}'));
|
||||
this.workspaceStorage = JSON.parse(this.storageService.get(ConfigurationUpgraderContribution.STORAGE_KEY, StorageScope.WORKSPACE, '{}'));
|
||||
this.processingPromise = (async () => {
|
||||
await this.processSettings();
|
||||
this.storageService.store(ConfigurationUpgraderContribution.STORAGE_KEY, JSON.stringify(this.globalStorage), StorageScope.GLOBAL);
|
||||
|
||||
Reference in New Issue
Block a user