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

Add missing compression property to WSRouteOptions type. #239

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

pkaminski
Copy link
Contributor

No description provided.

@kartikk221
Copy link
Owner

Hey, good catch on the missing property although I think we can make the property a bit more safer than the JSDoc property. The compression property is actually supposed to be a preset exported by HyperExpress.compressors which simply forwards the uWebsockets.js reference. We likely want to export these here https://github.com/uNetworking/uWebSockets.js/blob/64fc00078059649f24af3aab814afbb3f2e69709/docs/index.d.ts#L361-L399

@pkaminski
Copy link
Contributor Author

Sorry, I don't usually work with types-on-the-side JS so I'm not entirely sure what you mean. Did you just want to use CompressOptions instead of number in the property type? Or actually enumerate all the possible values?

@pkaminski
Copy link
Contributor Author

I update the property type to CompressOptions from uWebSockets.js but it's just an alias for number. I'm not sure it's possible to do any better since the docs encourage combining compressor and decompressor options with |`, so it wouldn't be practical to enumerate all possible combinations.

@kartikk221 kartikk221 merged commit fea3e59 into kartikk221:master Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants