private mapSetting()

in src/mapper.ts [121:139]


    private mapSetting(sublimeSetting: ISetting, mappedValue: any): VscodeSetting | undefined {
        if (mappedValue !== undefined) {
            if (typeof mappedValue === 'string') {
                return new VscodeSetting(mappedValue, sublimeSetting.value);
            } else if (typeof mappedValue === 'object') {
                const obj = mappedValue[sublimeSetting.value];
                if (!obj) {
                    vscode.window.showErrorMessage(`Failed to parse setting: '${sublimeSetting.name}: ${sublimeSetting.value}'. Please check if it contains syntax errors`);
                    return undefined;
                }
                const keys = Object.keys(obj);
                const newKey = keys[0];
                const newValue = obj[newKey];
                return new VscodeSetting(newKey, newValue);
            }
        }

        return undefined;
    }