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

[core] Introducing core-websockets #32555

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

[core] Introducing core-websockets #32555

wants to merge 1 commit into from

Conversation

deyaaeldeen
Copy link
Member

WIP

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

@azure/core-websockets

Copy link
Member

@jeremymeng jeremymeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see this abstraction! I added some comments for discussion.

throw compileErrors(errors);
}

function compileErrors(errors: unknown[]): Error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nicer if we could use ES2021 and AggregateError

| Uint8Array
| ArrayBuffer
| SharedArrayBuffer
| readonly any[]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should any[] be included? Feels strange if arbitrary shapes of objects are allowed. For number do we only allow a single byte, or treat it as multiple bytes? Also for number[] what about numbers that are bigger than uint8?

{
"name": "@azure/core-websockets",
"version": "1.0.0-beta.1",
"description": "Implementation of a websockets client for Node.js and browsers.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I am not too sure about this. Should we call this implementation of websockets client, or enhancement?

/**
* Types that are compatible with NodeJS Buffer.
*/
export type BufferLike =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we have a browser version too since some type Buffer is not available in browsers. Or should we have the common one ArrayBufferLike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants