UNPKG

1.16 kBTypeScriptView Raw
1import { ProviderResult } from 'vscode';
2import { ClientCapabilities, ServerCapabilities, ExecuteCommandRegistrationOptions, RegistrationType } from 'vscode-languageserver-protocol';
3import { FeatureClient, DynamicFeature, FeatureState, RegistrationData } from './features';
4export interface ExecuteCommandSignature {
5 (this: void, command: string, args: any[]): ProviderResult<any>;
6}
7export interface ExecuteCommandMiddleware {
8 executeCommand?: (this: void, command: string, args: any[], next: ExecuteCommandSignature) => ProviderResult<any>;
9}
10export declare class ExecuteCommandFeature implements DynamicFeature<ExecuteCommandRegistrationOptions> {
11 private readonly _client;
12 private readonly _commands;
13 constructor(client: FeatureClient<ExecuteCommandMiddleware>);
14 getState(): FeatureState;
15 get registrationType(): RegistrationType<ExecuteCommandRegistrationOptions>;
16 fillClientCapabilities(capabilities: ClientCapabilities): void;
17 initialize(capabilities: ServerCapabilities): void;
18 register(data: RegistrationData<ExecuteCommandRegistrationOptions>): void;
19 unregister(id: string): void;
20 clear(): void;
21}