UNPKG

vscode-languageclient

Version:
17 lines (16 loc) 1.45 kB
import { Disposable, TextDocument, ProviderResult, Position as VPosition, Definition as VDefinition, DefinitionLink as VDefinitionLink, TypeDefinitionProvider } from 'vscode'; import { ClientCapabilities, CancellationToken, ServerCapabilities, DocumentSelector, TypeDefinitionRegistrationOptions, TypeDefinitionOptions } from 'vscode-languageserver-protocol'; import { TextDocumentLanguageFeature, FeatureClient } from './features'; export interface ProvideTypeDefinitionSignature { (this: void, document: TextDocument, position: VPosition, token: CancellationToken): ProviderResult<VDefinition | VDefinitionLink[]>; } export interface TypeDefinitionMiddleware { provideTypeDefinition?: (this: void, document: TextDocument, position: VPosition, token: CancellationToken, next: ProvideTypeDefinitionSignature) => ProviderResult<VDefinition | VDefinitionLink[]>; } export declare class TypeDefinitionFeature extends TextDocumentLanguageFeature<boolean | TypeDefinitionOptions, TypeDefinitionRegistrationOptions, TypeDefinitionProvider, TypeDefinitionMiddleware> { constructor(client: FeatureClient<TypeDefinitionMiddleware>); fillClientCapabilities(capabilities: ClientCapabilities): void; initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void; protected registerLanguageProvider(options: TypeDefinitionRegistrationOptions): [Disposable, TypeDefinitionProvider]; private registerProvider; }