vscode-languageclient
Advanced tools
Comparing version 8.2.0-next.2 to 8.2.0-next.3
@@ -51,3 +51,3 @@ import { TextDocument, Disposable, OutputChannel, DiagnosticCollection, Diagnostic as VDiagnostic, Uri, CancellationToken, WorkspaceFolder as VWorkspaceFolder, FileCreateEvent, FileRenameEvent, FileDeleteEvent, FileWillCreateEvent, FileWillRenameEvent, FileWillDeleteEvent, CompletionItemProvider, HoverProvider, SignatureHelpProvider, DefinitionProvider, ReferenceProvider, DocumentHighlightProvider, CodeActionProvider, DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, RenameProvider, DocumentSymbolProvider, DocumentLinkProvider, DeclarationProvider, FoldingRangeProvider, ImplementationProvider, DocumentColorProvider, SelectionRangeProvider, TypeDefinitionProvider, CallHierarchyProvider, LinkedEditingRangeProvider, TypeHierarchyProvider, WorkspaceSymbolProvider, ProviderResult, TextEdit as VTextEdit, InlineCompletionItemProvider } from 'vscode'; | ||
*/ | ||
export declare type InitializationFailedHandler = | ||
export type InitializationFailedHandler = | ||
/** | ||
@@ -74,3 +74,3 @@ * @param error The error returned from the server | ||
} | ||
export declare type ErrorHandlerResult = { | ||
export type ErrorHandlerResult = { | ||
/** | ||
@@ -105,3 +105,3 @@ * The action to take. | ||
} | ||
export declare type CloseHandlerResult = { | ||
export type CloseHandlerResult = { | ||
/** | ||
@@ -178,3 +178,3 @@ * The action to take. | ||
} | ||
export declare type SuspendOptions = { | ||
export type SuspendOptions = { | ||
/** | ||
@@ -204,10 +204,10 @@ * Whether suspend mode is supported. If suspend mode is allowed | ||
} | ||
declare type _WorkspaceMiddleware = { | ||
type _WorkspaceMiddleware = { | ||
didChangeWatchedFile?: (this: void, event: FileEvent, next: DidChangeWatchedFileSignature) => Promise<void>; | ||
}; | ||
export declare type WorkspaceMiddleware = _WorkspaceMiddleware & ConfigurationMiddleware & DidChangeConfigurationMiddleware & WorkspaceFolderMiddleware & FileOperationsMiddleware; | ||
export type WorkspaceMiddleware = _WorkspaceMiddleware & ConfigurationMiddleware & DidChangeConfigurationMiddleware & WorkspaceFolderMiddleware & FileOperationsMiddleware; | ||
interface _WindowMiddleware { | ||
showDocument?: (this: void, params: ShowDocumentParams, next: ShowDocumentRequest.HandlerSignature) => Promise<ShowDocumentResult>; | ||
} | ||
export declare type WindowMiddleware = _WindowMiddleware; | ||
export type WindowMiddleware = _WindowMiddleware; | ||
export interface HandleDiagnosticsSignature { | ||
@@ -235,4 +235,4 @@ (this: void, uri: Uri, diagnostics: VDiagnostic[]): void; | ||
*/ | ||
export declare type Middleware = _Middleware & TextDocumentSynchronizationMiddleware & CompletionMiddleware & HoverMiddleware & DefinitionMiddleware & SignatureHelpMiddleware & DocumentHighlightMiddleware & DocumentSymbolMiddleware & WorkspaceSymbolMiddleware & ReferencesMiddleware & TypeDefinitionMiddleware & ImplementationMiddleware & ColorProviderMiddleware & CodeActionMiddleware & CodeLensMiddleware & FormattingMiddleware & RenameMiddleware & DocumentLinkMiddleware & ExecuteCommandMiddleware & FoldingRangeProviderMiddleware & DeclarationMiddleware & SelectionRangeProviderMiddleware & CallHierarchyMiddleware & SemanticTokensMiddleware & LinkedEditingRangeMiddleware & TypeHierarchyMiddleware & InlineValueMiddleware & InlayHintsMiddleware & NotebookDocumentMiddleware & DiagnosticProviderMiddleware & InlineCompletionMiddleware & GeneralMiddleware; | ||
export declare type LanguageClientOptions = { | ||
export type Middleware = _Middleware & TextDocumentSynchronizationMiddleware & CompletionMiddleware & HoverMiddleware & DefinitionMiddleware & SignatureHelpMiddleware & DocumentHighlightMiddleware & DocumentSymbolMiddleware & WorkspaceSymbolMiddleware & ReferencesMiddleware & TypeDefinitionMiddleware & ImplementationMiddleware & ColorProviderMiddleware & CodeActionMiddleware & CodeLensMiddleware & FormattingMiddleware & RenameMiddleware & DocumentLinkMiddleware & ExecuteCommandMiddleware & FoldingRangeProviderMiddleware & DeclarationMiddleware & SelectionRangeProviderMiddleware & CallHierarchyMiddleware & SemanticTokensMiddleware & LinkedEditingRangeMiddleware & TypeHierarchyMiddleware & InlineValueMiddleware & InlayHintsMiddleware & NotebookDocumentMiddleware & DiagnosticProviderMiddleware & InlineCompletionMiddleware & GeneralMiddleware; | ||
export type LanguageClientOptions = { | ||
documentSelector?: DocumentSelector | string[]; | ||
@@ -239,0 +239,0 @@ diagnosticCollectionName?: string; |
@@ -14,3 +14,3 @@ import { Disposable, TextDocument, ProviderResult, EventEmitter, CodeLensProvider, CodeLens as VCodeLens } from 'vscode'; | ||
} | ||
export declare type CodeLensProviderShape = { | ||
export type CodeLensProviderShape = { | ||
provider?: CodeLensProvider; | ||
@@ -17,0 +17,0 @@ onDidChangeCodeLensEmitter: EventEmitter<void>; |
@@ -20,3 +20,3 @@ import { FileSystemWatcher as VFileSystemWatcher, WorkspaceFolder as VWorkspaceFolder } from 'vscode'; | ||
private getConfiguration; | ||
dispose(): void; | ||
clear(): void; | ||
} | ||
@@ -33,3 +33,3 @@ export declare function toJSONObject(obj: any): any; | ||
} | ||
export declare type SynchronizeOptions = { | ||
export type SynchronizeOptions = { | ||
/** | ||
@@ -52,3 +52,3 @@ * The configuration sections to synchronize. Pushing settings from the | ||
}; | ||
export declare type $ConfigurationOptions = { | ||
export type $ConfigurationOptions = { | ||
synchronize?: SynchronizeOptions; | ||
@@ -59,3 +59,3 @@ workspaceFolder?: VWorkspaceFolder; | ||
private _client; | ||
private isDisposed; | ||
private isCleared; | ||
private readonly _listeners; | ||
@@ -69,3 +69,3 @@ constructor(_client: FeatureClient<DidChangeConfigurationWorkspaceMiddleware, $ConfigurationOptions>); | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
private onDidChangeConfiguration; | ||
@@ -72,0 +72,0 @@ private extractSettingsInformation; |
@@ -72,3 +72,3 @@ "use strict"; | ||
} | ||
dispose() { | ||
clear() { | ||
} | ||
@@ -98,3 +98,3 @@ } | ||
this._client = _client; | ||
this.isDisposed = false; | ||
this.isCleared = false; | ||
this._listeners = new Map(); | ||
@@ -112,2 +112,3 @@ } | ||
initialize() { | ||
this.isCleared = false; | ||
let section = this._client.clientOptions.synchronize?.configurationSection; | ||
@@ -139,3 +140,3 @@ if (section !== undefined) { | ||
} | ||
dispose() { | ||
clear() { | ||
for (const disposable of this._listeners.values()) { | ||
@@ -145,6 +146,6 @@ disposable.dispose(); | ||
this._listeners.clear(); | ||
this.isDisposed = true; | ||
this.isCleared = true; | ||
} | ||
onDidChangeConfiguration(configurationSection, event) { | ||
if (this.isDisposed) { | ||
if (this.isCleared) { | ||
return; | ||
@@ -151,0 +152,0 @@ } |
@@ -57,5 +57,5 @@ import { Disposable, CancellationToken, ProviderResult, Diagnostic as VDiagnostic, TextDocument, Event as VEvent, EventEmitter, Uri } from 'vscode'; | ||
} | ||
export declare type ProvideDiagnosticSignature = (this: void, document: TextDocument | Uri, previousResultId: string | undefined, token: CancellationToken) => ProviderResult<vsdiag.DocumentDiagnosticReport>; | ||
export declare type ProvideWorkspaceDiagnosticSignature = (this: void, resultIds: vsdiag.PreviousResultId[], token: CancellationToken, resultReporter: vsdiag.ResultReporter) => ProviderResult<vsdiag.WorkspaceDiagnosticReport>; | ||
export declare type DiagnosticProviderMiddleware = { | ||
export type ProvideDiagnosticSignature = (this: void, document: TextDocument | Uri, previousResultId: string | undefined, token: CancellationToken) => ProviderResult<vsdiag.DocumentDiagnosticReport>; | ||
export type ProvideWorkspaceDiagnosticSignature = (this: void, resultIds: vsdiag.PreviousResultId[], token: CancellationToken, resultReporter: vsdiag.ResultReporter) => ProviderResult<vsdiag.WorkspaceDiagnosticReport>; | ||
export type DiagnosticProviderMiddleware = { | ||
provideDiagnostics?: (this: void, document: TextDocument | Uri, previousResultId: string | undefined, token: CancellationToken, next: ProvideDiagnosticSignature) => ProviderResult<vsdiag.DocumentDiagnosticReport>; | ||
@@ -68,3 +68,3 @@ provideWorkspaceDiagnostics?: (this: void, resultIds: vsdiag.PreviousResultId[], token: CancellationToken, resultReporter: vsdiag.ResultReporter, next: ProvideWorkspaceDiagnosticSignature) => ProviderResult<vsdiag.WorkspaceDiagnosticReport>; | ||
} | ||
export declare type DiagnosticPullOptions = { | ||
export type DiagnosticPullOptions = { | ||
/** | ||
@@ -110,6 +110,6 @@ * Whether to pull for diagnostics on document change. | ||
}; | ||
export declare type $DiagnosticPullOptions = { | ||
export type $DiagnosticPullOptions = { | ||
diagnosticPullOptions?: DiagnosticPullOptions; | ||
}; | ||
export declare type DiagnosticProviderShape = { | ||
export type DiagnosticProviderShape = { | ||
onDidChangeDiagnosticsEmitter: EventEmitter<void>; | ||
@@ -123,4 +123,4 @@ diagnostics: vsdiag.DiagnosticProvider; | ||
initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void; | ||
dispose(): void; | ||
clear(): void; | ||
protected registerLanguageProvider(options: DiagnosticRegistrationOptions): [Disposable, DiagnosticProviderShape]; | ||
} |
@@ -26,3 +26,3 @@ "use strict"; | ||
})(DocumentDiagnosticReportKind = vsdiag.DocumentDiagnosticReportKind || (vsdiag.DocumentDiagnosticReportKind = {})); | ||
})(vsdiag = exports.vsdiag || (exports.vsdiag = {})); | ||
})(vsdiag || (exports.vsdiag = vsdiag = {})); | ||
var DiagnosticPullMode; | ||
@@ -32,3 +32,3 @@ (function (DiagnosticPullMode) { | ||
DiagnosticPullMode["onSave"] = "onSave"; | ||
})(DiagnosticPullMode = exports.DiagnosticPullMode || (exports.DiagnosticPullMode = {})); | ||
})(DiagnosticPullMode || (exports.DiagnosticPullMode = DiagnosticPullMode = {})); | ||
var RequestStateKind; | ||
@@ -801,3 +801,3 @@ (function (RequestStateKind) { | ||
} | ||
dispose() { | ||
clear() { | ||
if (this.tabs !== undefined) { | ||
@@ -807,3 +807,3 @@ this.tabs.dispose(); | ||
} | ||
super.dispose(); | ||
super.clear(); | ||
} | ||
@@ -810,0 +810,0 @@ registerLanguageProvider(options) { |
@@ -20,3 +20,3 @@ import { ProviderResult } from 'vscode'; | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
} |
@@ -65,3 +65,3 @@ "use strict"; | ||
} | ||
dispose() { | ||
clear() { | ||
this._commands.forEach((value) => { | ||
@@ -68,0 +68,0 @@ value.forEach(disposable => disposable.dispose()); |
@@ -17,4 +17,4 @@ import { TextDocument, Event as VEvent, DocumentSelector as VDocumentSelector, Event, Disposable, CancellationToken, ProviderResult, TextEdit as VTextEdit, ReferenceProvider, DefinitionProvider, SignatureHelpProvider, HoverProvider, CompletionItemProvider, WorkspaceSymbolProvider, DocumentHighlightProvider, CodeActionProvider, DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, RenameProvider, DocumentSymbolProvider, DocumentLinkProvider, DocumentColorProvider, DeclarationProvider, FoldingRangeProvider, ImplementationProvider, SelectionRangeProvider, TypeDefinitionProvider, CallHierarchyProvider, LinkedEditingRangeProvider, TypeHierarchyProvider, FileCreateEvent, FileRenameEvent, FileDeleteEvent, FileWillCreateEvent, FileWillRenameEvent, FileWillDeleteEvent, CancellationError } from 'vscode'; | ||
} | ||
export declare type FeatureStateKind = 'document' | 'workspace' | 'static' | 'window'; | ||
export declare type FeatureState = { | ||
export type FeatureStateKind = 'document' | 'workspace' | 'static' | 'window'; | ||
export type FeatureState = { | ||
kind: 'document'; | ||
@@ -102,6 +102,7 @@ /** | ||
/** | ||
* Called when the client is stopped to dispose this feature. Usually a feature | ||
* un-registers listeners registered hooked up with the VS Code extension host. | ||
* Called when the client is stopped or re-started to clear this feature. | ||
* Usually a feature un-registers listeners registered hooked up with the | ||
* VS Code extension host. | ||
*/ | ||
dispose(): void; | ||
clear(): void; | ||
} | ||
@@ -169,6 +170,7 @@ export declare namespace StaticFeature { | ||
/** | ||
* Called when the client is stopped to dispose this feature. Usually a feature | ||
* un-registers listeners registered hooked up with the VS Code extension host. | ||
* Called when the client is stopped or re-started to clear this feature. | ||
* Usually a feature un-registers listeners registered hooked up with the | ||
* VS Code extension host. | ||
*/ | ||
dispose(): void; | ||
clear(): void; | ||
} | ||
@@ -205,3 +207,3 @@ export declare namespace DynamicFeature { | ||
abstract unregister(id: string): void; | ||
abstract dispose(): void; | ||
abstract clear(): void; | ||
/** | ||
@@ -252,3 +254,3 @@ * Returns the state the feature is in. | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
getProvider(document: TextDocument): { | ||
@@ -268,3 +270,3 @@ send: (data: E) => Promise<void>; | ||
} | ||
export declare type DocumentSelectorOptions = { | ||
export type DocumentSelectorOptions = { | ||
documentSelector: DocumentSelector; | ||
@@ -287,3 +289,3 @@ }; | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
protected getRegistration(documentSelector: DocumentSelector | undefined, capability: undefined | PO | (RO & StaticRegistrationOptions)): [string | undefined, (RO & { | ||
@@ -301,3 +303,3 @@ documentSelector: DocumentSelector; | ||
} | ||
declare type WorkspaceFeatureRegistration<PR> = { | ||
type WorkspaceFeatureRegistration<PR> = { | ||
disposable: Disposable; | ||
@@ -318,3 +320,3 @@ provider: PR; | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
getProviders(): PR[]; | ||
@@ -321,0 +323,0 @@ } |
@@ -31,7 +31,7 @@ "use strict"; | ||
return candidate !== undefined && candidate !== null && | ||
Is.func(candidate.fillClientCapabilities) && Is.func(candidate.initialize) && Is.func(candidate.getState) && Is.func(candidate.dispose) && | ||
Is.func(candidate.fillClientCapabilities) && Is.func(candidate.initialize) && Is.func(candidate.getState) && Is.func(candidate.clear) && | ||
(candidate.fillInitializeParams === undefined || Is.func(candidate.fillInitializeParams)); | ||
} | ||
StaticFeature.is = is; | ||
})(StaticFeature = exports.StaticFeature || (exports.StaticFeature = {})); | ||
})(StaticFeature || (exports.StaticFeature = StaticFeature = {})); | ||
var DynamicFeature; | ||
@@ -42,3 +42,3 @@ (function (DynamicFeature) { | ||
return candidate !== undefined && candidate !== null && | ||
Is.func(candidate.fillClientCapabilities) && Is.func(candidate.initialize) && Is.func(candidate.getState) && Is.func(candidate.dispose) && | ||
Is.func(candidate.fillClientCapabilities) && Is.func(candidate.initialize) && Is.func(candidate.getState) && Is.func(candidate.clear) && | ||
(candidate.fillInitializeParams === undefined || Is.func(candidate.fillInitializeParams)) && Is.func(candidate.register) && | ||
@@ -48,3 +48,3 @@ Is.func(candidate.unregister) && candidate.registrationType !== undefined; | ||
DynamicFeature.is = is; | ||
})(DynamicFeature = exports.DynamicFeature || (exports.DynamicFeature = {})); | ||
})(DynamicFeature || (exports.DynamicFeature = DynamicFeature = {})); | ||
/** | ||
@@ -82,2 +82,10 @@ * An abstract dynamic feature implementation that operates on documents (e.g. text | ||
class TextDocumentEventFeature extends DynamicDocumentFeature { | ||
static textDocumentFilter(selectors, textDocument) { | ||
for (const selector of selectors) { | ||
if (vscode_1.languages.match(selector, textDocument) > 0) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
constructor(client, event, type, middleware, createParams, textDocument, selectorFilter) { | ||
@@ -94,10 +102,2 @@ super(client); | ||
} | ||
static textDocumentFilter(selectors, textDocument) { | ||
for (const selector of selectors) { | ||
if (vscode_1.languages.match(selector, textDocument) > 0) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
getStateInfo() { | ||
@@ -152,3 +152,3 @@ return [this._selectors.values(), false]; | ||
} | ||
dispose() { | ||
clear() { | ||
this._selectors.clear(); | ||
@@ -210,3 +210,3 @@ this._onNotificationSent.dispose(); | ||
} | ||
dispose() { | ||
clear() { | ||
this._registrations.forEach((value) => { | ||
@@ -284,3 +284,3 @@ value.disposable.dispose(); | ||
} | ||
dispose() { | ||
clear() { | ||
this._registrations.forEach((registration) => { | ||
@@ -287,0 +287,0 @@ registration.disposable.dispose(); |
@@ -40,3 +40,3 @@ import * as code from 'vscode'; | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
protected getFileType(uri: code.Uri): Promise<code.FileType | undefined>; | ||
@@ -66,3 +66,3 @@ protected filter(event: E, prop: (i: I) => code.Uri): Promise<E>; | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
} | ||
@@ -69,0 +69,0 @@ export declare class DidCreateFilesFeature extends NotificationFileOperationFeature<code.Uri, code.FileCreateEvent, proto.CreateFilesParams> { |
@@ -83,3 +83,3 @@ "use strict"; | ||
} | ||
dispose() { | ||
clear() { | ||
this._filters.clear(); | ||
@@ -208,4 +208,4 @@ if (this._listener) { | ||
} | ||
dispose() { | ||
super.dispose(); | ||
clear() { | ||
super.clear(); | ||
if (this._willListener) { | ||
@@ -212,0 +212,0 @@ this._willListener.dispose(); |
@@ -17,3 +17,3 @@ import { FileSystemWatcher as VFileSystemWatcher } from 'vscode'; | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
} |
@@ -86,3 +86,3 @@ "use strict"; | ||
} | ||
dispose() { | ||
clear() { | ||
this._watchers.forEach((disposables) => { | ||
@@ -89,0 +89,0 @@ for (let disposable of disposables) { |
import { Disposable, TextDocument, ProviderResult, Range as VRange, InlayHint as VInlayHint, InlayHintsProvider, EventEmitter } from 'vscode'; | ||
import { ClientCapabilities, CancellationToken, ServerCapabilities, DocumentSelector, InlayHintOptions, InlayHintRegistrationOptions } from 'vscode-languageserver-protocol'; | ||
import { TextDocumentLanguageFeature, FeatureClient } from './features'; | ||
export declare type ProvideInlayHintsSignature = (this: void, document: TextDocument, viewPort: VRange, token: CancellationToken) => ProviderResult<VInlayHint[]>; | ||
export declare type ResolveInlayHintSignature = (this: void, item: VInlayHint, token: CancellationToken) => ProviderResult<VInlayHint>; | ||
export declare type InlayHintsMiddleware = { | ||
export type ProvideInlayHintsSignature = (this: void, document: TextDocument, viewPort: VRange, token: CancellationToken) => ProviderResult<VInlayHint[]>; | ||
export type ResolveInlayHintSignature = (this: void, item: VInlayHint, token: CancellationToken) => ProviderResult<VInlayHint>; | ||
export type InlayHintsMiddleware = { | ||
provideInlayHints?: (this: void, document: TextDocument, viewPort: VRange, token: CancellationToken, next: ProvideInlayHintsSignature) => ProviderResult<VInlayHint[]>; | ||
resolveInlayHint?: (this: void, item: VInlayHint, token: CancellationToken, next: ResolveInlayHintSignature) => ProviderResult<VInlayHint>; | ||
}; | ||
export declare type InlayHintsProviderShape = { | ||
export type InlayHintsProviderShape = { | ||
provider: InlayHintsProvider; | ||
@@ -12,0 +12,0 @@ onDidChangeInlayHints: EventEmitter<void>; |
@@ -10,3 +10,3 @@ import { TextDocument, Disposable, Position as VPosition, InlineCompletionContext as VInlineCompletionContext, CancellationToken, ProviderResult, InlineCompletionItem as VInlineCompletionItem, InlineCompletionList as VInlineCompletionList, InlineCompletionItemProvider } from 'vscode'; | ||
} | ||
export declare type InlineCompletionProviderShape = { | ||
export type InlineCompletionProviderShape = { | ||
provider: InlineCompletionItemProvider; | ||
@@ -13,0 +13,0 @@ }; |
import { Disposable, TextDocument, ProviderResult, Range as VRange, InlineValueContext as VInlineValueContext, InlineValue as VInlineValue, InlineValuesProvider, EventEmitter } from 'vscode'; | ||
import { ClientCapabilities, CancellationToken, ServerCapabilities, DocumentSelector, InlineValueOptions, InlineValueRegistrationOptions } from 'vscode-languageserver-protocol'; | ||
import { TextDocumentLanguageFeature, FeatureClient } from './features'; | ||
export declare type ProvideInlineValuesSignature = (this: void, document: TextDocument, viewPort: VRange, context: VInlineValueContext, token: CancellationToken) => ProviderResult<VInlineValue[]>; | ||
export declare type InlineValueMiddleware = { | ||
export type ProvideInlineValuesSignature = (this: void, document: TextDocument, viewPort: VRange, context: VInlineValueContext, token: CancellationToken) => ProviderResult<VInlineValue[]>; | ||
export type InlineValueMiddleware = { | ||
provideInlineValues?: (this: void, document: TextDocument, viewPort: VRange, context: VInlineValueContext, token: CancellationToken, next: ProvideInlineValuesSignature) => ProviderResult<VInlineValue[]>; | ||
}; | ||
export declare type InlineValueProviderShape = { | ||
export type InlineValueProviderShape = { | ||
provider: InlineValuesProvider; | ||
@@ -10,0 +10,0 @@ onDidChangeInlineValues: EventEmitter<void>; |
@@ -5,3 +5,3 @@ import * as vscode from 'vscode'; | ||
import { DynamicFeature, FeatureClient, RegistrationData, FeatureState } from './features'; | ||
export declare type VNotebookDocumentChangeEvent = { | ||
export type VNotebookDocumentChangeEvent = { | ||
/** | ||
@@ -54,9 +54,9 @@ * The notebook document | ||
}; | ||
export declare type NotebookDocumentOptions = { | ||
export type NotebookDocumentOptions = { | ||
filterCells?(notebookDocument: vscode.NotebookDocument, cells: vscode.NotebookCell[]): vscode.NotebookCell[]; | ||
}; | ||
export declare type $NotebookDocumentOptions = { | ||
export type $NotebookDocumentOptions = { | ||
notebookDocumentOptions?: NotebookDocumentOptions; | ||
}; | ||
export declare type NotebookDocumentMiddleware = { | ||
export type NotebookDocumentMiddleware = { | ||
notebooks?: { | ||
@@ -75,6 +75,6 @@ didOpen?: (this: void, notebookDocument: vscode.NotebookDocument, cells: vscode.NotebookCell[], next: (this: void, notebookDocument: vscode.NotebookDocument, cells: vscode.NotebookCell[]) => Promise<void>) => Promise<void>; | ||
} | ||
export declare type $NotebookCellTextDocumentFilter = NotebookCellTextDocumentFilter & { | ||
export type $NotebookCellTextDocumentFilter = NotebookCellTextDocumentFilter & { | ||
sync: true; | ||
}; | ||
export declare type NotebookDocumentProviderShape = { | ||
export type NotebookDocumentProviderShape = { | ||
getProvider(notebookCell: vscode.NotebookCell): NotebookDocumentSyncFeatureShape | undefined; | ||
@@ -95,3 +95,3 @@ }; | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
handles(textDocument: vscode.TextDocument): boolean; | ||
@@ -98,0 +98,0 @@ getProvider(notebookCell: vscode.NotebookCell): NotebookDocumentSyncFeatureShape | undefined; |
@@ -810,3 +810,3 @@ "use strict"; | ||
} | ||
dispose() { | ||
clear() { | ||
for (const provider of this.registrations.values()) { | ||
@@ -813,0 +813,0 @@ provider.dispose(); |
@@ -10,3 +10,3 @@ import { ClientCapabilities } from 'vscode-languageserver-protocol'; | ||
initialize(): void; | ||
dispose(): void; | ||
clear(): void; | ||
} |
@@ -37,3 +37,3 @@ "use strict"; | ||
} | ||
dispose() { | ||
clear() { | ||
for (const part of this.activeParts) { | ||
@@ -40,0 +40,0 @@ part.done(); |
@@ -17,3 +17,3 @@ "use strict"; | ||
DiagnosticCode.is = is; | ||
})(DiagnosticCode = exports.DiagnosticCode || (exports.DiagnosticCode = {})); | ||
})(DiagnosticCode || (exports.DiagnosticCode = DiagnosticCode = {})); | ||
class ProtocolDiagnostic extends vscode.Diagnostic { | ||
@@ -20,0 +20,0 @@ constructor(range, message, severity, data) { |
@@ -15,3 +15,3 @@ import { TextDocument, TextDocumentChangeEvent, TextDocumentWillSaveEvent, TextEdit as VTextEdit, DocumentSelector as VDocumentSelector, Event } from 'vscode'; | ||
} | ||
export declare type ResolvedTextDocumentSyncCapabilities = { | ||
export type ResolvedTextDocumentSyncCapabilities = { | ||
resolvedTextDocumentSync?: TextDocumentSyncOptions; | ||
@@ -65,3 +65,3 @@ }; | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
getPendingDocumentChanges(excludes: Set<string>): TextDocument[]; | ||
@@ -91,3 +91,3 @@ getProvider(document: TextDocument): { | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
} | ||
@@ -94,0 +94,0 @@ export interface DidSaveTextDocumentFeatureShape extends DynamicFeature<TextDocumentRegistrationOptions>, TextDocumentSendFeature<(textDocument: TextDocument) => Promise<void>>, NotifyingFeature<DidSaveTextDocumentParams> { |
@@ -225,3 +225,3 @@ "use strict"; | ||
} | ||
dispose() { | ||
clear() { | ||
this._pendingTextDocumentChanges.clear(); | ||
@@ -363,3 +363,3 @@ this._changeData.clear(); | ||
} | ||
dispose() { | ||
clear() { | ||
this._selectors.clear(); | ||
@@ -366,0 +366,0 @@ if (this._listener) { |
import { Disposable, TextDocument, ProviderResult, Position as VPosition, CancellationToken, TypeHierarchyProvider as VTypeHierarchyProvider, TypeHierarchyItem as VTypeHierarchyItem } from 'vscode'; | ||
import { ClientCapabilities, DocumentSelector, ServerCapabilities, TypeHierarchyRegistrationOptions, TypeHierarchyOptions } from 'vscode-languageserver-protocol'; | ||
import { TextDocumentLanguageFeature, FeatureClient } from './features'; | ||
export declare type PrepareTypeHierarchySignature = (this: void, document: TextDocument, position: VPosition, token: CancellationToken) => ProviderResult<VTypeHierarchyItem[]>; | ||
export declare type TypeHierarchySupertypesSignature = (this: void, item: VTypeHierarchyItem, token: CancellationToken) => ProviderResult<VTypeHierarchyItem[]>; | ||
export declare type TypeHierarchySubtypesSignature = (this: void, item: VTypeHierarchyItem, token: CancellationToken) => ProviderResult<VTypeHierarchyItem[]>; | ||
export type PrepareTypeHierarchySignature = (this: void, document: TextDocument, position: VPosition, token: CancellationToken) => ProviderResult<VTypeHierarchyItem[]>; | ||
export type TypeHierarchySupertypesSignature = (this: void, item: VTypeHierarchyItem, token: CancellationToken) => ProviderResult<VTypeHierarchyItem[]>; | ||
export type TypeHierarchySubtypesSignature = (this: void, item: VTypeHierarchyItem, token: CancellationToken) => ProviderResult<VTypeHierarchyItem[]>; | ||
/** | ||
@@ -12,3 +12,3 @@ * Type hierarchy middleware | ||
*/ | ||
export declare type TypeHierarchyMiddleware = { | ||
export type TypeHierarchyMiddleware = { | ||
prepareTypeHierarchy?: (this: void, document: TextDocument, positions: VPosition, token: CancellationToken, next: PrepareTypeHierarchySignature) => ProviderResult<VTypeHierarchyItem[]>; | ||
@@ -15,0 +15,0 @@ provideTypeHierarchySupertypes?: (this: void, item: VTypeHierarchyItem, token: CancellationToken, next: TypeHierarchySupertypesSignature) => ProviderResult<VTypeHierarchyItem[]>; |
import { CancellationToken } from 'vscode'; | ||
export declare type ITask<T> = () => T; | ||
export type ITask<T> = () => T; | ||
export declare class Delayer<T> { | ||
@@ -28,3 +28,3 @@ defaultDelay: number; | ||
export declare function clearTestMode(): void; | ||
export declare type YieldOptions = { | ||
export type YieldOptions = { | ||
/** | ||
@@ -31,0 +31,0 @@ * The time in ms after which the function should yield. |
@@ -21,2 +21,8 @@ "use strict"; | ||
class V4UUID extends ValueUUID { | ||
static _oneOf(array) { | ||
return array[Math.floor(array.length * Math.random())]; | ||
} | ||
static _randomHex() { | ||
return V4UUID._oneOf(V4UUID._chars); | ||
} | ||
constructor() { | ||
@@ -62,8 +68,2 @@ super([ | ||
} | ||
static _oneOf(array) { | ||
return array[Math.floor(array.length * Math.random())]; | ||
} | ||
static _randomHex() { | ||
return V4UUID._oneOf(V4UUID._chars); | ||
} | ||
} | ||
@@ -70,0 +70,0 @@ V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']; |
@@ -5,7 +5,7 @@ import { WorkspaceFolder as VWorkspaceFolder, WorkspaceFoldersChangeEvent as VWorkspaceFoldersChangeEvent } from 'vscode'; | ||
export declare function arrayDiff<T>(left: ReadonlyArray<T>, right: ReadonlyArray<T>): T[]; | ||
export declare type WorkspaceFolderMiddleware = { | ||
export type WorkspaceFolderMiddleware = { | ||
workspaceFolders?: WorkspaceFoldersRequest.MiddlewareSignature; | ||
didChangeWorkspaceFolders?: NextSignature<VWorkspaceFoldersChangeEvent, Promise<void>>; | ||
}; | ||
declare type WorkspaceFolderWorkspaceMiddleware = { | ||
type WorkspaceFolderWorkspaceMiddleware = { | ||
workspace?: WorkspaceFolderMiddleware; | ||
@@ -28,5 +28,5 @@ }; | ||
unregister(id: string): void; | ||
dispose(): void; | ||
clear(): void; | ||
private asProtocol; | ||
} | ||
export {}; |
@@ -135,3 +135,3 @@ "use strict"; | ||
} | ||
dispose() { | ||
clear() { | ||
for (let disposable of this._listeners.values()) { | ||
@@ -138,0 +138,0 @@ disposable.dispose(); |
@@ -31,3 +31,3 @@ /// <reference types="node" /> | ||
*/ | ||
export declare type Transport = TransportKind | SocketTransport; | ||
export type Transport = TransportKind | SocketTransport; | ||
export interface ExecutableOptions { | ||
@@ -67,3 +67,3 @@ cwd?: string; | ||
} | ||
export declare type ServerOptions = Executable | { | ||
export type ServerOptions = Executable | { | ||
run: Executable; | ||
@@ -70,0 +70,0 @@ debug: Executable; |
@@ -42,3 +42,3 @@ "use strict"; | ||
TransportKind[TransportKind["socket"] = 3] = "socket"; | ||
})(TransportKind = exports.TransportKind || (exports.TransportKind = {})); | ||
})(TransportKind || (exports.TransportKind = TransportKind = {})); | ||
var Transport; | ||
@@ -45,0 +45,0 @@ (function (Transport) { |
{ | ||
"name": "vscode-languageclient", | ||
"description": "VSCode Language client implementation", | ||
"version": "8.2.0-next.2", | ||
"version": "8.2.0-next.3", | ||
"author": "Microsoft Corporation", | ||
@@ -32,4 +32,4 @@ "license": "MIT", | ||
"minimatch": "^5.1.0", | ||
"semver": "^7.5.4", | ||
"vscode-languageserver-protocol": "3.17.4-next.2" | ||
"semver": "^7.3.7", | ||
"vscode-languageserver-protocol": "3.17.4-next.3" | ||
}, | ||
@@ -44,3 +44,3 @@ "scripts": { | ||
"test": "cd ../client-node-tests && npm test && cd ../client", | ||
"clean": "node ../node_modules/rimraf/bin.js lib", | ||
"clean": "node ../node_modules/.bin/rimraf lib", | ||
"all": "npm run clean && npm run compile && npm run lint && npm test", | ||
@@ -47,0 +47,0 @@ "compile:publish": "node ../build/bin/tsc -b ./tsconfig.publish.json && shx cp src/node/terminateProcess.sh lib/node/terminateProcess.sh", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12990
651923
+ Addedvscode-jsonrpc@8.2.0-next.2(transitive)
+ Addedvscode-languageserver-protocol@3.17.4-next.3(transitive)
+ Addedvscode-languageserver-types@3.17.4-next.2(transitive)
- Removedvscode-jsonrpc@8.2.0-next.1(transitive)
- Removedvscode-languageserver-protocol@3.17.4-next.2(transitive)
- Removedvscode-languageserver-types@3.17.4-next.1(transitive)
Updatedsemver@^7.3.7