Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)

* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
This commit is contained in:
Anthony Dresser
2019-07-15 22:35:46 -07:00
committed by GitHub
parent f720ec642f
commit 0b7e7ddbf9
2406 changed files with 59140 additions and 35464 deletions

View File

@@ -38,7 +38,9 @@ export class ExtensionMemento implements IExtensionMemento {
return this._init;
}
get<T>(key: string, defaultValue: T): T {
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];
if (typeof value === 'undefined') {
value = defaultValue;
@@ -46,11 +48,9 @@ export class ExtensionMemento implements IExtensionMemento {
return value;
}
update(key: string, value: any): Promise<boolean> {
update(key: string, value: any): Promise<void> {
this._value[key] = value;
return this._storage
.setValue(this._shared, this._id, this._value)
.then(() => true);
return this._storage.setValue(this._shared, this._id, this._value);
}
dispose(): void {