massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-json / node_modules / vscode-languageserver / lib / common / fileOperations.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.FileOperationsFeature = void 0;
8 const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
9 const FileOperationsFeature = (Base) => {
10     return class extends Base {
11         onDidCreateFiles(handler) {
12             this.connection.onNotification(vscode_languageserver_protocol_1.DidCreateFilesNotification.type, (params) => {
13                 handler(params);
14             });
15         }
16         onDidRenameFiles(handler) {
17             this.connection.onNotification(vscode_languageserver_protocol_1.DidRenameFilesNotification.type, (params) => {
18                 handler(params);
19             });
20         }
21         onDidDeleteFiles(handler) {
22             this.connection.onNotification(vscode_languageserver_protocol_1.DidDeleteFilesNotification.type, (params) => {
23                 handler(params);
24             });
25         }
26         onWillCreateFiles(handler) {
27             return this.connection.onRequest(vscode_languageserver_protocol_1.WillCreateFilesRequest.type, (params, cancel) => {
28                 return handler(params, cancel);
29             });
30         }
31         onWillRenameFiles(handler) {
32             return this.connection.onRequest(vscode_languageserver_protocol_1.WillRenameFilesRequest.type, (params, cancel) => {
33                 return handler(params, cancel);
34             });
35         }
36         onWillDeleteFiles(handler) {
37             return this.connection.onRequest(vscode_languageserver_protocol_1.WillDeleteFilesRequest.type, (params, cancel) => {
38                 return handler(params, cancel);
39             });
40         }
41     };
42 };
43 exports.FileOperationsFeature = FileOperationsFeature;
44 //# sourceMappingURL=fileOperations.js.map