question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

createConnection overloads not visible in package

See original GitHub issue

I recently tried to update my language server to 7.0.0

but my connection creation on the server-side keeps returning an error. And I cannot find any documentation on the new parameters that are apparently needed on how to properly set it up.

The code that I used:

  let connection = createConnection(ProposedFeatures.all);

returns the following error: Expected 2-3 arguments.

So I went looking through the package and found the following:

in lib/common/server.d.ts is the function for:

export declare function createConnection<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _, PLanguages = _>(connectionFactory: (logger: Logger) => ProtocolConnection, watchDog: WatchDog, factories?: Features<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace, PLanguages>): _Connection<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace, PLanguages>;

But there are 4 overloads in lib/node/main.d.ts that I believe to be the correct overloads for the user to be using. However, the only one I get recommended or seems to exist is the one in server.js

I’m unsure if it is something I have done wrong gets wrongly exported or is just missing documentation atm.

My project in question: https://github.com/Blockception/VSCode-Bedrock-Development-Extension/tree/Language-server-update

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
rcjsuencommented, Dec 27, 2020

@DaanV2 You should also update your vscode-languageserver dependency to 7.x instead of using 6.x. That’s what I did with my language server.

2reactions
rcjsuencommented, Dec 25, 2020

@DaanV2 I ran into this yesterday as well. I had to fix it by importing from vscode-languageserver/node instead of vscode-languageserver.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c++ - overloaded method not seen in subclass - Stack Overflow
Essentially, you are not overloading the base class method; by redefining method f , you are hiding the base class method.
Read more >
Package.CreateRelationship Method (System.IO.Packaging)
Overloads ; CreateRelationship(Uri, TargetMode, String). Creates a package-level relationship to a part with a given URI, target mode, and relationship type.
Read more >
CREATE PROCEDURE - Snowflake Documentation
Stored procedures support overloading. Two procedures can have the same name if they have a different number of parameters or different data types...
Read more >
RabbitMQ.Client - Class ConnectionFactory
Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and...
Read more >
Overview - RabbitMQ
NET/C# Client API Guide. Overview. This guide covers RabbitMQ .NET/C# client and its public API. It assumes that the most recent major version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found