Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-languageclient

Package Overview
Dependencies
Maintainers
7
Versions
302
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-languageclient - npm Package Compare versions

Comparing version 10.0.0-next.3 to 10.0.0-next.4

6

lib/browser/main.d.ts
import { BaseLanguageClient, LanguageClientOptions, MessageTransports } from '../common/api';
export * from 'vscode-languageserver-protocol/browser';
export * from '../common/api';
export type ServerOptions = Worker | (() => Promise<Worker | MessageTransports>);
export declare class LanguageClient extends BaseLanguageClient {
private readonly worker;
constructor(id: string, name: string, clientOptions: LanguageClientOptions, worker: Worker);
private readonly options;
constructor(id: string, name: string, clientOptions: LanguageClientOptions, options: ServerOptions);
protected createMessageTransports(_encoding: string): Promise<MessageTransports>;
private createMessageTransportsFromWorker;
}

@@ -27,9 +27,23 @@ "use strict";

class LanguageClient extends api_1.BaseLanguageClient {
constructor(id, name, clientOptions, worker) {
constructor(id, name, clientOptions, options) {
super(id, name, clientOptions);
this.worker = worker;
this.options = options;
}
createMessageTransports(_encoding) {
const reader = new browser_1.BrowserMessageReader(this.worker);
const writer = new browser_1.BrowserMessageWriter(this.worker);
async createMessageTransports(_encoding) {
if (typeof this.options === 'function') {
const result = await this.options();
if (result instanceof Worker) {
return this.createMessageTransportsFromWorker(result);
}
else {
return result;
}
}
else {
return this.createMessageTransportsFromWorker(this.options);
}
}
createMessageTransportsFromWorker(worker) {
const reader = new browser_1.BrowserMessageReader(worker);
const writer = new browser_1.BrowserMessageWriter(worker);
return Promise.resolve({ reader, writer });

@@ -36,0 +50,0 @@ }

@@ -153,2 +153,6 @@ 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, ImplementationProvider, DocumentColorProvider, SelectionRangeProvider, TypeDefinitionProvider, CallHierarchyProvider, LinkedEditingRangeProvider, TypeHierarchyProvider, WorkspaceSymbolProvider, ProviderResult, TextEdit as VTextEdit, InlineCompletionItemProvider } from 'vscode';

/**
* The start has failed.
*/
StartFailed = 4,
/**
* The client is running and ready.

@@ -480,2 +484,8 @@ */

}
export type ServerOptions = () => Promise<MessageTransports>;
export declare class LanguageClient extends BaseLanguageClient {
private readonly options;
constructor(id: string, name: string, clientOptions: LanguageClientOptions, options: ServerOptions);
protected createMessageTransports(_encoding: string): Promise<MessageTransports>;
}
export declare namespace ProposedFeatures {

@@ -482,0 +492,0 @@ function createAll(_client: FeatureClient<Middleware, LanguageClientOptions>): (StaticFeature | DynamicFeature<any>)[];

{
"name": "vscode-languageclient",
"description": "VSCode Language client implementation",
"version": "10.0.0-next.3",
"version": "10.0.0-next.4",
"author": "Microsoft Corporation",

@@ -6,0 +6,0 @@ "license": "MIT",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc