mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 4d91d96e5e121b38d33508cdef17868bab255eae
This commit is contained in:
committed by
AzureDataStudio
parent
a971aee5bd
commit
5e7071e466
@@ -88,7 +88,7 @@ export interface IConfigurationValue<T> {
|
||||
}
|
||||
|
||||
export interface IConfigurationService {
|
||||
_serviceBrand: undefined;
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
|
||||
|
||||
@@ -323,14 +323,16 @@ export function getConfigurationValue<T>(config: any, settingPath: string, defau
|
||||
|
||||
export function merge(base: any, add: any, overwrite: boolean): void {
|
||||
Object.keys(add).forEach(key => {
|
||||
if (key in base) {
|
||||
if (types.isObject(base[key]) && types.isObject(add[key])) {
|
||||
merge(base[key], add[key], overwrite);
|
||||
} else if (overwrite) {
|
||||
if (key !== '__proto__') {
|
||||
if (key in base) {
|
||||
if (types.isObject(base[key]) && types.isObject(add[key])) {
|
||||
merge(base[key], add[key], overwrite);
|
||||
} else if (overwrite) {
|
||||
base[key] = add[key];
|
||||
}
|
||||
} else {
|
||||
base[key] = add[key];
|
||||
}
|
||||
} else {
|
||||
base[key] = add[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
|
||||
export class ConfigurationService extends Disposable implements IConfigurationService, IDisposable {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
||||
private configuration: Configuration;
|
||||
private userConfiguration: UserSettings;
|
||||
|
||||
Reference in New Issue
Block a user