UNPKG

1.49 kBJavaScriptView Raw
1/* --------------------------------------------------------------------------------------------
2 * Copyright (c) Microsoft Corporation. All rights reserved.
3 * Licensed under the MIT License. See License.txt in the project root for license information.
4 * ------------------------------------------------------------------------------------------ */
5'use strict';
6Object.defineProperty(exports, "__esModule", { value: true });
7exports.InlayHintFeature = void 0;
8const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
9const InlayHintFeature = (Base) => {
10 return class extends Base {
11 get inlayHint() {
12 return {
13 refresh: () => {
14 return this.connection.sendRequest(vscode_languageserver_protocol_1.InlayHintRefreshRequest.type);
15 },
16 on: (handler) => {
17 return this.connection.onRequest(vscode_languageserver_protocol_1.InlayHintRequest.type, (params, cancel) => {
18 return handler(params, cancel, this.attachWorkDoneProgress(params));
19 });
20 },
21 resolve: (handler) => {
22 return this.connection.onRequest(vscode_languageserver_protocol_1.InlayHintResolveRequest.type, (params, cancel) => {
23 return handler(params, cancel);
24 });
25 }
26 };
27 }
28 };
29};
30exports.InlayHintFeature = InlayHintFeature;