microsoft / microsoft/vscode-languageserver-node

Support sending and receiving typed arrays

Open
#1,027 0 comments 0 reactions 1 assignee View on GitHub

@dbaeumer is already working on this.

Since Jul 12, 2022.

feature-request
Dominant language
TypeScript
Stars
1.8k
Forks
404
Avg merge
2d 8h
Merged PRs (30d)
14

Description

Feature request

Support sending and receiving typed arrays (such as UInt8Array) in custom messages

Use case

I'n using custom messages to read files from the client. Here's an example RequestType:

RequestType<{ uri: string }, UInt8Array, any>

Currently when the client returns a new UInt8Array([1, 2, 3]), the server receives a json object with array index keys:

Screen Shot 2022-07-11 at 11 52 16 AM

This then has to be converted back into a UInt8Array. For larger payloads, this conversion is time consuming and the expansion of the UInt8Array also means a lot more data ends up needing to be transmitted between the client and server

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.