massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-json / node_modules / vscode-languageserver / lib / browser / main.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 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7     if (k2 === undefined) k2 = k;
8     Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9 }) : (function(o, m, k, k2) {
10     if (k2 === undefined) k2 = k;
11     o[k2] = m[k];
12 }));
13 var __exportStar = (this && this.__exportStar) || function(m, exports) {
14     for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15 };
16 Object.defineProperty(exports, "__esModule", { value: true });
17 exports.createConnection = void 0;
18 const api_1 = require("../common/api");
19 __exportStar(require("vscode-languageserver-protocol/browser"), exports);
20 __exportStar(require("../common/api"), exports);
21 let _shutdownReceived = false;
22 const watchDog = {
23     initialize: (_params) => {
24     },
25     get shutdownReceived() {
26         return _shutdownReceived;
27     },
28     set shutdownReceived(value) {
29         _shutdownReceived = value;
30     },
31     exit: (_code) => {
32     }
33 };
34 function createConnection(arg1, arg2, arg3, arg4) {
35     let factories;
36     let reader;
37     let writer;
38     let options;
39     if (arg1 !== void 0 && arg1.__brand === 'features') {
40         factories = arg1;
41         arg1 = arg2;
42         arg2 = arg3;
43         arg3 = arg4;
44     }
45     if (api_1.ConnectionStrategy.is(arg1) || api_1.ConnectionOptions.is(arg1)) {
46         options = arg1;
47     }
48     else {
49         reader = arg1;
50         writer = arg2;
51         options = arg3;
52     }
53     const connectionFactory = (logger) => {
54         return api_1.createProtocolConnection(reader, writer, logger, options);
55     };
56     return api_1.createConnection(connectionFactory, watchDog, factories);
57 }
58 exports.createConnection = createConnection;
59 //# sourceMappingURL=main.js.map