1 | import { Disposable, TextDocument, ProviderResult, Position as VPosition, Declaration as VDeclaration, DeclarationProvider } from 'vscode';
|
2 | import { ClientCapabilities, CancellationToken, ServerCapabilities, DocumentSelector, DeclarationRegistrationOptions, DeclarationOptions } from 'vscode-languageserver-protocol';
|
3 | import { TextDocumentLanguageFeature, FeatureClient } from './features';
|
4 | export interface ProvideDeclarationSignature {
|
5 | (this: void, document: TextDocument, position: VPosition, token: CancellationToken): ProviderResult<VDeclaration>;
|
6 | }
|
7 | export interface DeclarationMiddleware {
|
8 | provideDeclaration?: (this: void, document: TextDocument, position: VPosition, token: CancellationToken, next: ProvideDeclarationSignature) => ProviderResult<VDeclaration>;
|
9 | }
|
10 | export declare class DeclarationFeature extends TextDocumentLanguageFeature<boolean | DeclarationOptions, DeclarationRegistrationOptions, DeclarationProvider, DeclarationMiddleware> {
|
11 | constructor(client: FeatureClient<DeclarationMiddleware>);
|
12 | fillClientCapabilities(capabilities: ClientCapabilities): void;
|
13 | initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void;
|
14 | protected registerLanguageProvider(options: DeclarationRegistrationOptions): [Disposable, DeclarationProvider];
|
15 | private registerProvider;
|
16 | }
|