massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-json / node_modules / vscode-languageserver / lib / common / configuration.js
1 "use strict";
2 /* --------------------------------------------------------------------------------------------
3  * Copyright (c) Microsoft Corporation. All rights reserved.
4  * Licensed under the MIT License. See License.txt in the project root for license information.
5  * ------------------------------------------------------------------------------------------ */
6 Object.defineProperty(exports, "__esModule", { value: true });
7 exports.ConfigurationFeature = void 0;
8 const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
9 const Is = require("./utils/is");
10 const ConfigurationFeature = (Base) => {
11     return class extends Base {
12         getConfiguration(arg) {
13             if (!arg) {
14                 return this._getConfiguration({});
15             }
16             else if (Is.string(arg)) {
17                 return this._getConfiguration({ section: arg });
18             }
19             else {
20                 return this._getConfiguration(arg);
21             }
22         }
23         _getConfiguration(arg) {
24             let params = {
25                 items: Array.isArray(arg) ? arg : [arg]
26             };
27             return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
28                 return Array.isArray(arg) ? result : result[0];
29             });
30         }
31     };
32 };
33 exports.ConfigurationFeature = ConfigurationFeature;
34 //# sourceMappingURL=configuration.js.map