UNPKG

1.52 kBTypeScriptView Raw
1import { TextDocument, Disposable, Position as VPosition, CancellationToken, ProviderResult, SignatureHelpProvider, SignatureHelpContext as VSignatureHelpContext, SignatureHelp as VSignatureHelp } from 'vscode';
2import { ClientCapabilities, DocumentSelector, ServerCapabilities, SignatureHelpOptions, SignatureHelpRegistrationOptions } from 'vscode-languageserver-protocol';
3import { FeatureClient, TextDocumentLanguageFeature, DocumentSelectorOptions } from './features';
4export interface ProvideSignatureHelpSignature {
5 (this: void, document: TextDocument, position: VPosition, context: VSignatureHelpContext, token: CancellationToken): ProviderResult<VSignatureHelp>;
6}
7export interface SignatureHelpMiddleware {
8 provideSignatureHelp?: (this: void, document: TextDocument, position: VPosition, context: VSignatureHelpContext, token: CancellationToken, next: ProvideSignatureHelpSignature) => ProviderResult<VSignatureHelp>;
9}
10export declare class SignatureHelpFeature extends TextDocumentLanguageFeature<SignatureHelpOptions, SignatureHelpRegistrationOptions, SignatureHelpProvider, SignatureHelpMiddleware> {
11 constructor(client: FeatureClient<SignatureHelpMiddleware>);
12 fillClientCapabilities(capabilities: ClientCapabilities): void;
13 initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void;
14 protected registerLanguageProvider(options: SignatureHelpRegistrationOptions & DocumentSelectorOptions): [Disposable, SignatureHelpProvider];
15 private registerProvider;
16}