UNPKG

langium

Version:

A language engineering tool for the Language Server Protocol

19 lines 1.1 kB
/****************************************************************************** * Copyright 2021 TypeFox GmbH * This program and the accompanying materials are made available under the * terms of the MIT License, which is available in the project root. ******************************************************************************/ import type { CodeAction, CodeActionParams, Command } from 'vscode-languageserver'; import type { CancellationToken } from '../utils/cancellation.js'; import type { MaybePromise } from '../utils/promise-utils.js'; import type { LangiumDocument } from '../workspace/documents.js'; export interface CodeActionProvider { /** * Handle a code action request. * * @throws `OperationCancelled` if cancellation is detected during execution * @throws `ResponseError` if an error is detected that should be sent as response to the client */ getCodeActions(document: LangiumDocument, params: CodeActionParams, cancelToken?: CancellationToken): MaybePromise<Array<Command | CodeAction> | undefined>; } //# sourceMappingURL=code-action.d.ts.map