Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)

This commit is contained in:
Anthony Dresser
2019-08-12 21:31:51 -07:00
committed by GitHub
parent 00250839fc
commit 7eba8c4c03
616 changed files with 9472 additions and 7087 deletions

View File

@@ -14,7 +14,7 @@ export class ExtensionMemento implements IExtensionMemento {
private readonly _storage: ExtHostStorage;
private readonly _init: Promise<ExtensionMemento>;
private _value: { [n: string]: any; };
private _value?: { [n: string]: any; };
private readonly _storageListener: IDisposable;
constructor(id: string, global: boolean, storage: ExtHostStorage) {
@@ -41,7 +41,7 @@ export class ExtensionMemento implements IExtensionMemento {
get<T>(key: string): T | undefined;
get<T>(key: string, defaultValue: T): T;
get<T>(key: string, defaultValue?: T): T {
let value = this._value[key];
let value = this._value![key];
if (typeof value === 'undefined') {
value = defaultValue;
}
@@ -49,8 +49,8 @@ export class ExtensionMemento implements IExtensionMemento {
}
update(key: string, value: any): Promise<void> {
this._value[key] = value;
return this._storage.setValue(this._shared, this._id, this._value);
this._value![key] = value;
return this._storage.setValue(this._shared, this._id, this._value!);
}
dispose(): void {