import { Disposable, TextDocument, ProviderResult, Position as VPosition, CallHierarchyItem as VCallHierarchyItem, CallHierarchyIncomingCall as VCallHierarchyIncomingCall, CallHierarchyOutgoingCall as VCallHierarchyOutgoingCall, CancellationToken, CallHierarchyProvider as VCallHierarchyProvider } from 'vscode'; import { ClientCapabilities, ServerCapabilities, DocumentSelector, CallHierarchyOptions, CallHierarchyRegistrationOptions } from 'vscode-languageserver-protocol'; import { TextDocumentLanguageFeature, FeatureClient } from './features'; export interface PrepareCallHierarchySignature { (this: void, document: TextDocument, position: VPosition, token: CancellationToken): ProviderResult; } export interface CallHierarchyIncomingCallsSignature { (this: void, item: VCallHierarchyItem, token: CancellationToken): ProviderResult; } export interface CallHierarchyOutgoingCallsSignature { (this: void, item: VCallHierarchyItem, token: CancellationToken): ProviderResult; } /** * Call hierarchy middleware * * @since 3.16.0 */ export interface CallHierarchyMiddleware { prepareCallHierarchy?: (this: void, document: TextDocument, positions: VPosition, token: CancellationToken, next: PrepareCallHierarchySignature) => ProviderResult; provideCallHierarchyIncomingCalls?: (this: void, item: VCallHierarchyItem, token: CancellationToken, next: CallHierarchyIncomingCallsSignature) => ProviderResult; provideCallHierarchyOutgoingCalls?: (this: void, item: VCallHierarchyItem, token: CancellationToken, next: CallHierarchyOutgoingCallsSignature) => ProviderResult; } declare class CallHierarchyProvider implements VCallHierarchyProvider { private client; private middleware; constructor(client: FeatureClient); prepareCallHierarchy(document: TextDocument, position: VPosition, token: CancellationToken): ProviderResult; provideCallHierarchyIncomingCalls(item: VCallHierarchyItem, token: CancellationToken): ProviderResult; provideCallHierarchyOutgoingCalls(item: VCallHierarchyItem, token: CancellationToken): ProviderResult; } export declare class CallHierarchyFeature extends TextDocumentLanguageFeature { constructor(client: FeatureClient); fillClientCapabilities(cap: ClientCapabilities): void; initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void; protected registerLanguageProvider(options: CallHierarchyRegistrationOptions): [Disposable, CallHierarchyProvider]; } export {};