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