import { Disposable, TextDocument, ProviderResult, Position as VPosition, Declaration as VDeclaration, DeclarationProvider } from 'vscode'; import { ClientCapabilities, CancellationToken, ServerCapabilities, DocumentSelector, DeclarationRegistrationOptions, DeclarationOptions } from 'vscode-languageserver-protocol'; import { TextDocumentLanguageFeature, FeatureClient } from './features'; export interface ProvideDeclarationSignature { (this: void, document: TextDocument, position: VPosition, token: CancellationToken): ProviderResult; } export interface DeclarationMiddleware { provideDeclaration?: (this: void, document: TextDocument, position: VPosition, token: CancellationToken, next: ProvideDeclarationSignature) => ProviderResult; } export declare class DeclarationFeature extends TextDocumentLanguageFeature { constructor(client: FeatureClient); fillClientCapabilities(capabilities: ClientCapabilities): void; initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void; protected registerLanguageProvider(options: DeclarationRegistrationOptions): [Disposable, DeclarationProvider]; private registerProvider; }