UNPKG

1.45 kBTypeScriptView Raw
1import { TextDocument, Disposable, Position as VPosition, CancellationToken, ProviderResult, ReferenceProvider, Location as VLocation } from 'vscode';
2import { ClientCapabilities, DocumentSelector, ReferenceOptions, ReferenceRegistrationOptions, ServerCapabilities, TextDocumentRegistrationOptions } from 'vscode-languageserver-protocol';
3import { FeatureClient, TextDocumentLanguageFeature } from './features';
4export interface ProvideReferencesSignature {
5 (this: void, document: TextDocument, position: VPosition, options: {
6 includeDeclaration: boolean;
7 }, token: CancellationToken): ProviderResult<VLocation[]>;
8}
9export interface ReferencesMiddleware {
10 provideReferences?: (this: void, document: TextDocument, position: VPosition, options: {
11 includeDeclaration: boolean;
12 }, token: CancellationToken, next: ProvideReferencesSignature) => ProviderResult<VLocation[]>;
13}
14export declare class ReferencesFeature extends TextDocumentLanguageFeature<boolean | ReferenceOptions, ReferenceRegistrationOptions, ReferenceProvider, ReferencesMiddleware> {
15 constructor(client: FeatureClient<ReferencesMiddleware>);
16 fillClientCapabilities(capabilities: ClientCapabilities): void;
17 initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void;
18 protected registerLanguageProvider(options: TextDocumentRegistrationOptions): [Disposable, ReferenceProvider];
19 private registerProvider;
20}