UNPKG

1.45 kBTypeScriptView Raw
1import { Disposable, TextDocument, ProviderResult, Position as VPosition, Definition as VDefinition, DefinitionLink as VDefinitionLink, ImplementationProvider } from 'vscode';
2import { ClientCapabilities, CancellationToken, ServerCapabilities, DocumentSelector, ImplementationRegistrationOptions, ImplementationOptions } from 'vscode-languageserver-protocol';
3import { TextDocumentLanguageFeature, FeatureClient } from './features';
4export interface ProvideImplementationSignature {
5 (this: void, document: TextDocument, position: VPosition, token: CancellationToken): ProviderResult<VDefinition | VDefinitionLink[]>;
6}
7export interface ImplementationMiddleware {
8 provideImplementation?: (this: void, document: TextDocument, position: VPosition, token: CancellationToken, next: ProvideImplementationSignature) => ProviderResult<VDefinition | VDefinitionLink[]>;
9}
10export declare class ImplementationFeature extends TextDocumentLanguageFeature<boolean | ImplementationOptions, ImplementationRegistrationOptions, ImplementationProvider, ImplementationMiddleware> {
11 constructor(client: FeatureClient<ImplementationMiddleware>);
12 fillClientCapabilities(capabilities: ClientCapabilities): void;
13 initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void;
14 protected registerLanguageProvider(options: ImplementationRegistrationOptions): [Disposable, ImplementationProvider];
15 private registerProvider;
16}