Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing exported types from jsonrpc encoding #1292

Closed
mroch opened this issue Aug 10, 2023 · 1 comment · Fixed by #1316
Closed

Missing exported types from jsonrpc encoding #1292

mroch opened this issue Aug 10, 2023 · 1 comment · Fixed by #1316
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@mroch
Copy link
Contributor

mroch commented Aug 10, 2023

ContentEncoder, ContentDecoder, ContentTypeEncoder and ContentTypeDecoder should be exported from jsonrpc, I think.

Details

MessageReaderOptions uses ContentDecoder and ContentTypeDecoder:

export interface MessageReaderOptions {
charset?: RAL.MessageBufferEncoding;
contentDecoder?: ContentDecoder;
contentDecoders?: ContentDecoder[];
contentTypeDecoder?: ContentTypeDecoder;
contentTypeDecoders?: ContentTypeDecoder[];
}

similar for MessageWriterOptions:

export interface MessageWriterOptions {
charset?: RAL.MessageBufferEncoding;
contentEncoder?: ContentEncoder;
contentTypeEncoder?: ContentTypeEncoder;
}

MessageReaderOptions and MessageWriterOptions are public:

// Export from message reader
MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo,
// Export from message write
MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions,

Right now I have to do

import type {ContentTypeDecoderOptions} from 'vscode-jsonrpc/node';
import type {ContentTypeDecoder} from 'vscode-jsonrpc/lib/common/encoding';
@dbaeumer dbaeumer added the bug Issue identified by VS Code Team member as probable bug label Aug 11, 2023
@dbaeumer dbaeumer added this to the Next milestone Aug 11, 2023
@mroch
Copy link
Contributor Author

mroch commented Sep 13, 2023

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants