Skip to content

Commit

Permalink
Merge pull request #239 from pkaminski/patch-1
Browse files Browse the repository at this point in the history
Add missing `compression` property to `WSRouteOptions` type.
  • Loading branch information
kartikk221 authored Mar 25, 2024
2 parents e4a5c7c + 5c97292 commit fea3e59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/components/router/Router.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Request } from '../http/Request';
import { Response } from '../http/Response';
import { Websocket } from '../ws/Websocket';
import { MiddlewareHandler } from '../middleware/MiddlewareHandler';
import { CompressOptions } from 'uWebSockets.js';

// Define types for HTTP Route Creators
export type UserRouteHandler = (request: Request, response: Response) => void;
Expand All @@ -16,6 +17,7 @@ export interface UserRouteOptions {
export type WSRouteHandler<TUserData = unknown> = (websocket: Websocket<TUserData>) => void;
export interface WSRouteOptions {
message_type?: 'String' | 'Buffer' | 'ArrayBuffer';
compression?: CompressOptions;
idle_timeout?: number;
max_backpressure?: number;
max_payload_length?: number;
Expand Down

0 comments on commit fea3e59

Please sign in to comment.